Undefined and New version of scanner declaration
dparadox opened this issue · comments
Esteban Lopez commented
Hello,
I have a problem with the declaration of the factory, there is a problem for $digest already in progress.
Before You set deferred, You should check if $digest already in progress.
if(!$rootScope.$$phase ) {
//$digest or $apply
}
$rootScope.$apply( function () {
deferred.reject(barcodeScanner_msgs['errors.barcodeScanner.undefined']);
});
You have to declare scanner object like this:
var scanner = cordova.require("com.phonegap.plugins.barcodescanner.BarcodeScanner");
Thank you
Micah Delane Bolen commented
I think I'm having the same issue. I'm not exactly sure how to fix it. @estebanlopezlumenup do you have a patch?