BarcodeScanner fails to start
The barcode scanner fails to start.
This issue happens because the BarcodeScanner object is missing.
  • Add the BarcodeScanner plugin to the project. (Use Install from Plugins Marketplace from Properties/Plugins/Other Plugins.)
  • Update the JavaScript library appery.js to a version that uses cordova.plugins.barcodeScanner instead of BarcodeScanner.
    (Use Add from the toolbar or from the context menu on the folder "files/resources/lib/base" to import the updated version.)

An updated version of library can be found at the following location:

You can confirm that you are using the new version of appery.js by checking its main change. Line 2035 of appery.js uses cordova.plugins.barcodeScanner instead of BarcodeScanner.

If you are displaying an alert() message on the callback of barcode scanner service, you may want to call it using the setTimeout function:


setTimeout(function() {
}, 0);

Related links: