javascript - Barcode Scanner Phonegap not working -
i trying include barcode scanner plugin phonegap (phonegap 5.1.1) , can't make work (https://github.com/phonegap/phonegap-plugin-barcodescanner)
first of all, installed plugin running:
phonegap plugin add phonegap-plugin-barcodescanner
then have javascript function:
function leerbarcode(){ //navigator.notification.alert("llega leerbarcode", alertdismissed, "mensaje", "ok"); cordova.plugins.barcodescanner.scan(function (result) { alert("we got barcode\n" + "result: " + result.text + "\n" + "format: " + result.format + "\n" + "cancelled: " + result.cancelled); }, function (error) { alert("scanning failed: " + error); }); }
when click on button calls function, doesn't launch camera. please, can me?
Comments
Post a Comment