Cordova Plugin to receive input from a TC55 Scanner. This works by setting up a DataWedge profile that has an Intent Output.
- Open the DataWedge App
- Create a new profile (enabled)
- Under
Associated appsselect your application - Under
Barcode Input, check theEnabledsetting - Under
Keystoke Output, leave theEnabledsetting unchecked - Under
Intent Output:Enabledneeds to be checkedIntent actionneeds to be set to:com.icsfl.rfsmart.RECVRIntent categoryneeds to be set to:android.intent.category.DEFAULTIntent deliveryneeds to be set toSend via startActivity
This plugin uses the setKeepCallback feature of the PluginResult so that you don't have to continually register to listen for scans. Wire up an scan event listener like this:
tc55.listenForScans(function(data) {
// do something with 'data'
console.log('You scanned: ' + data);
}, function(error) {
// do something with 'errir'
console.log('Something went wrong: ' + error);
});Subsequent calls to listenForScans will replace the previously set callbacks.