Skip to content Skip to sidebar Skip to footer

Creating A Helloworld Plugin For Android Using Cordova And Eclipse

I've done quite a bit of research and can't seem to find why this isn't working. What I have is Cordova based Android app in Eclipse running Cordova 2.7.0. I want to build a simp

Solution 1:

In this line

window.func = function(str,callback){
        alert("Outside Call Working");
        cordova.exec(callback, function(err){alert(err)},"HelloPlugin","echo", [str]);
    }

put like this

window.func = function(str,callback){
        alert("Outside Call Working");
        cordova.exec(callback, function(err){alert(err)},"org.apache.cordova.plugin.HelloPlugin","echo", [str]);
    }

Solution 2:

The value of "HelloPlugin" in your config.xml should point to the package where the Java class is, so that Cordova can find and execute the Java code. So if you change <plugin name="HelloPlugin" value="org.apache.cordova.plugin.HelloPlugin" /> to <plugin name="HelloPlugin" value="com.example.plugintest.HelloPlugin" /> I believe it should work.

Post a Comment for "Creating A Helloworld Plugin For Android Using Cordova And Eclipse"