Cordova Barcode Scanner works for iOS but not Android

I have an app that has the Cordova Barcode Scanner to scan the UPC number. It works fine on iOS and returns the results as expected. However on Android Marshmallow 6.1 it scans and shows the message Product found on the camera screen but doesn’t return any values to my view as expected. I have scanned through my entire app and no where I have the text Product found. Not sure what is the source of this message. Please help.

Turns out a very silly issue that is OS specific caused it to fail. iOS handles false as a 0 and android as a text string false. I just had to put this condition and it worked.

if($scope.cancelled === 0 || $scope.cancelled === false)

1 Like