背景:我将Windows Phone 8版本Katzer's LocalNotifications Plugin添加到asiFarran's LocalNotifications Plugin。我在plugins/wp8.json
改变config_munge
后从“0”到:1
我没有得到Plugin not allowed in config.xml
了和日志显示Adding feature.value=LocalNotification
但现在:Phonegap 3.3.0:无法找到命令:: LocalNotification
问题:日志显示Unable to locate command :: LocalNotification
。我跟踪到CommandFactory.cs line 94。
我plugin.xml
包含WP8:
<platform name="wp8">
<config-file target="config.xml" parent="/*">
<feature name="LocalNotification">
<param name="wp-package" value="LocalNotification"/>
</feature>
</config-file>
<source-file src="src/wp8/LocalNotification.cs" />
<source-file src="src/wp8/Options.cs" />
</platform>
器和插件在3210补充说:
<gap:plugin name="com.stratogos.cordova.localNotifications" version="0.1.0" />
文件被复制到platform/wp8
。我删除并重新创建了wp8平台,但没有解决它。
如果我set the namespace in call方法我回到:Plugin not allowed in config.xml
。
在JavaScript我打电话
exec(null,null,"LocalNotification","addNotification",[defaults]);
的插件有src/wp8/LocalNotification.cs
有:
namespace Cordova.Extension.Commands
{
public class LocalNotification : BaseCommand
{
public void addNotification(string jsonArgs)
{
...
按照documentation类名称必须与我在exec()
我打电话匹配。所以我的错误一定是我想的其他地方。
更新
我找不到在WP8项目LocalNotification.cs
。这个插件文件应该如何以及在哪里添加?