This is my HelloPlugin.js file.
var HelloPlugin = {
callNativeFunction: function(success,fail,resultType) {
return cordova.exec(success, fail, "HelloPlugin", "nativeAction", [resultType]);
}
};
I am getting the following exception:
: Uncaught ReferenceError: cordova is not defined at file:///android_asset/www/HelloPlugin.js:3
Thank you in advance.
Pleas make sure you have <script ...
tag for cordova.js before <script ...
tag for HelloPlugin.js in your HTML file.
It should have both in the <head>
tag like this:
<script src="cordova.js"></script>
<script src="HelloPlugin.js"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With