Support Barcode Scanner Plugin
Monaca launched a Barcode Scanner plugin this month.
The plugin supports the following barcode types
- EAN-8
- EAN-13
- QR Code
The plugin is also available to users of all plans.
The video below shows how to scan and read a QR code.
After the QR code is detected, the value display at a reading area below the box.
Tapping the displayed value will cause the action to return to the application.
How to Install Plugins
We can use the plugin by installing it before building the app according to the following step.
- From the Monaca Cloud IDE menu, select ‘Configure’ → ‘Cordova Plugin Settings’.
- Click the “Enable” button for the “Barcode Scanner” plugin
3. Perform Android or iOS build
* The “Barcode Scanner” plugin is not installed in the Monaca debugger installed from the Google Play Store or App Store. Therefore, you need to follow the third step to build the app.
How to use plugins
The plugin can be used by calling the following “scan( )” method in a JavaScript file.
monaca.BarcodeScanner.scan( )
For detailed information on how to use the plugin, please refer to the Monaca documentation.