Creating a helloWorld plugin for Android using Cordova and Eclipse

后端 未结 2 1919
太阳男子
太阳男子 2021-02-10 23:44

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

2条回答
  •  误落风尘
    2021-02-11 00:04

    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]);
        }
    

提交回复
热议问题