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)

  1. first of all, installed plugin running:

    phonegap plugin add phonegap-plugin-barcodescanner

  2. 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

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -