Issue:
BarcodeScanner fails to start
 
Description:
The barcode scanner fails to start.
This issue happens because the BarcodeScanner object is missing.
 
Solution:
  • 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:

    https://community.progress.com/community_groups/mobile/m/documents/2551

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.

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

Example:

setTimeout(function() {
    alert(message);
}, 0);

Related links: