Hi there!
I am trying to create a plugin using Cordova 2.7 and C# on Windows Phone 8. I followed the plugin development guide step by step. So currently I have these functions in my index.html:
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady() {
window.echo = function (str, callback) {
cordova.exec(callback, function (err) {
callback('Nothing to echo.');
}, "sh.flyingfi.cordovaExtensions.Scheduler", "echo", [str]);
};
window.echo("echome", function (echoValue) {
alert(echoValue == "echome");
});
}
The scheduler class looks like this:
using WPCordovaClassLib.Cordova;
using WPCordovaClassLib.Cordova.Commands;
using WPCordovaClassLib.Cordova.JSON;
namespace sh.flyingfi.cordovaExtensions
{
public class Scheduler : BaseCommand
{
public void echo(string options)
{
DispatchCommandResult(new PluginResult(PluginResult.Status.OK, "Everything went as planned, this is a result that is passed to the success handler."));
}
}
}
Finally I added <plugin name="Scheduler" value="sh.flyingfi.cordovaExtensions.echo"/> to config.xml.
When debugging the output is "Error::Plugin not allowed in config.xml".
I don't understand why. Could anyone help me?
Thanks! :)
--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.