Barcode scanner doesn't go to scanning sometimes
Hi I have used the barcode scanner in a cordova application, the problem is sometimes calling cordova.plugins.barcodeScanner.scan(...) method doesn't go to scanning process, it won't show the camera image and it doesn't do anything. I just want to know if this is a known issue or is it related to anything on the phone? (p.s. I have restarted the phone, clean the memory, android 4.2.4)
The same problem here. The promise returns success with an object that the object.cancelled is equal true.
code

console.log

@lourenci the same for me,could you tell me how did it?
@ChenJerome, I gave up Cordova. 😐 I am coding in native language. Good luck!
@lourenci thank you so much~~~~(>_<)~~~~
@lourenci i solved it yesterday.the code like this: $scope.scanBarcode = function(){ //alert("With this alert, the scan is useful"); $timeout(function(){ 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); } ); },500); }; hope useful.
use on-touch="action()" not ng-click="action()"