Hi everyone,
I'm creating an android application, and I need to read barCode or QR-code.
So i'm using this script, really basic:
<script type="text/javascript">
function scanBarcode(){
cordova.plugins.barcodeScanner.scan(
function(result){
alert("We got a barcode\n" +
"Result: " + result.text + "\n" +
"Format: " + result.format + "\n" +
"Cancelled: " + result.cancelled);
},
function(error){
alert("Scanning failed: " + error);
}
)
}
</script>
and i call it with that:
<input type="button" onClick="scanBarcode()" value="Scan"/>
So now I need to add the plugin phonegap which permit that. But my tries failed ( like: cordova plugin add com.phonegap.plugins.barcodescanner, ...). I don't know why. So if someone can help me, and explain me how do it in a good way?
Thanks.