0.0.2 • Published 4 years ago

@xjfs/nlscan-plugin-barcodescanner v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

BarcodeScannerPlugin

This is a cordova plugin for newland MT65,MT90.

You can install it to your cordova app and use offered js api to get scanning result or change scanner's setting.

Use sample:https://github.com/feifly6666/CordovaPluginDemo

How to install

①Download the plugin and extract it.

②Move to your cordova project folder and execute the following command

cordova plugin add ../extract path/BarcodeScannerPlugin/

JS API

Aftere install BarcodeScanner plugin,you can use the following JS API to get scanning result or change scanner setting.

MethodArg1Arg2Comment
nlscan.plugins.barcodescanner.scan()nullnullstart to scan
nlscan.plugins.barcodescanner.show(arg1)scan resultnullIn BarcodeScanner.js the scanning result is set to a textarea(id is "outputArea"),you can modify it to other dom object.Actually, this method is for Java code.
nlscan.plugins.barcodescanner.scanSetting(arg1,arg2)EXTRA_SCAN_POWER0 or 10: Disable scanning1: Enable scanning
EXTRA_TRIG_MODE0 or 1 or 20: Trigger mode is normal trigger1: Trigger mode is continuous trigger2: Trigger mode is timeout trigger
EXTRA_SCAN_NOTY_SND0 or 10: Turn off the voice prompts1: Turn on the voice prompts