java - (Cordova 2.6.0 | Phonegap) Cannot call method 'exec' of undefined -


i'm having issues new version of cordova.js (2.6.0). seems methods exec doesn't exist anymore.

var phonenumberplugin = {      callnativefunction: function (success, fail, resulttype) {         return cordova.exec( success, fail,                             "com.phonenumber",                             "nativeaction", [resulttype]);     }  }; 


error: 04-18 14:47:20.039: e/web console(6623): uncaught typeerror: cannot call method 'exec' of undefined @ file:///android_asset/www/phonenumberplugin.js:4 

how call native plugins now? saw method callbackfromnative! knows if 1 can me out?!

is full code plugin? please see https://github.com/phonegap/phonegap-plugins/wiki/defining-your-cordova-plugin-as-a-cordova-module think should help.

also, sure waiting cordova loaded page? eg, wait until ondeviceready fires.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -