I am fairly new to Ionic development and thus far has not run into too many problems. However, I am stuck on trying to get PDF417 type bar-codes to scan (using phonegap-plugin-barcodescanner), despite the documentation suggesting that they are supported via pass the "PDF_417" parameter in the "formats" option. Note: the scanning works on other codes such as QR_CODE, EAN_13 - So the code is mostly right. I don't think that the options list after the error function is being processed.
$cordovaBarcodeScanner.scan().then(function(imageData) {
$scope.si_data_display = imageData.text;
console.log("app.js :: .controller - MainCtrl :: scan_barcode :: text : " + imageData.text);
console.log("app.js :: .controller - MainCtrl :: scan_barcode :: format : " + imageData.format);
console.log("app.js :: .controller - MainCtrl :: scan_barcode :: cancelled : " + imageData.cancelled);
}, function(error) {
//TODO: better error handling...
alert("Error with BarcodeScanner" + error);
},
{ //I DONT THINK THIS IS WORKING!
"preferFrontCamera" : true, // iOS and Android
"showFlipCameraButton" : true, // iOS and Android
"prompt" : "zzzzzzzzzzzz", // supported on Android only
"formats" : "PDF_417", // default: all but PDF_417 and RSS_EXPANDED
});
Any help, suggestion and or pointers will be gratefully received.
Thank you in advance, Harold Clements