javascript - issue using plugin in phonegap -
I'm trying to write ios in html; Javascript which can scan the code once using the phonegap build. I've added the following line in the PhoneGrap config.xml for the barcode reader plugin:
& lt; Difference: Plugin name = "com.phonegap.plugins.barcodescanner" version = "1.1.0" />
I have the following code from the plugin example in the listener for a button:
cordova.plugins.barcodeScanner.scan (function (result) {warning ("us a Barcode found \ n "+" Result: "+ result.text +" \ n "+" format: "+ result. +" \ N "+" has been canceled: "+ result canceled);} , Function (error) {warning ("scanning failed:" + error);}); When I try to run the app and press the scan button I get the following error:
"Variable can not be found: Cordova" / P>
Any help that I am missing will be highly appreciated. Thanks
I found a solution to my problem Html file as file cordova.js Type script = " Text / javascript "src =" cordova.js "& gt;
Thanks HTML>
Comments
Post a Comment