Customize Barcodescanner with Flashlight, Popups and Text

Hi,

I am developing an application for iOS and Android. Basically i am using this barcodescanner plugin:

GitHub - Dbuggerx/BarcodeScanner: cross-platform BarcodeScanner for Cordova / PhoneGap

It works pretty smooth and i really like it, but is there any other barcodescannerplugin that supports customizations like using the flashlight, changing the default text in the scanview and use popups in front of the scanview?

Thank you in advance and keep up the great work :).

Hi,

I could solve at least the ‘default text’ issue on Android, so if anyone faces the same problem i hope i can help you with this:

The Barcodescanner has the function ‘scan’ which is declared as such:

BarcodeScanner.prototype.scan = function (successCallback, errorCallback, customLabel)

This is pretty much self explanatory. If you also want to change the position of the label, you will have to alter the layout xml file in

platforms\android\res\layout\capture.xml

At the bottom of the page you will find the according TextView.

EDIT : “Solved” the flashlight problem for Android. It is already built-in. After searching the source files i recognized that the plugin does support the flashlight. It is triggered by the volumenkeys.

1 Like