Articles on: Hardware Barcode Scanners

Zebra TC Series Integration (Barcode Scanner)



Zebra TC devices such as the TC20/TC25, TC51 & TC70 are built for enterprise and industrial use. They have built in barcode scanners for speed and reliability that no camera barcode scanner can match.

We have worked with a number of Zebra TC devices to ensure that Kiosk Browser & Kiosk Launcher integrate with the barcode scanner in the best way possible.

Customers who are using Zebra devices running Android 11 or higher, please follow additional instructions at the bottom of this article.
Zebra DataWedge Application

The Zebra DataWedge application sends barcode scan results in the form of keyboard input (HID) by default, so if Kiosk Browser/Launcher has focus on a textbox within your web application the barcode result will automatically be entered into that field. However there are scenarios where you may want to receive the results of scans differently or receive the data of multiple scans. To send the results directly to Kiosk Browser/Launcher follow the steps below:

Open DataWedge application
Tap Profile0 (default)
Scroll down to Keystroke output and untick Enabled
Scroll down to Intent output and tick Enabled
In the Intent action field type in com.procoit.kioskbrowser.BARCODE_SCAN_EVENT OR com.procoit.kiosklauncher.BARCODE_SCAN_EVENT
Make sure that Intent delivery is set to Send via startService
Tick Use startForegroundService on failure
If running Android 11 please complete the extra steps at the bottom of this article

Zebra Data Wedge Application


Receiving Results via JavaScript Callback

Once the DataWedge application is configured results are automatically loaded via the Barcode Redirect URL set under Settings > Toolbar (Kiosk Browser) or Settings > Browser (Kiosk Launcher) as per the section below. If you wish to receive the results via JavaScript you must register for the barcode scan callback. Once registered each scan result is sent via barcodeScanResult(data). This callback PERSISTS page loads, so you may need to unregister the callback on other pages if you do not always want the results to be fed back to you via JavaScript (use false as parameter).

function registerForBarcodeScanResults() {
   if (typeof Android != 'undefined') {
      //tell KB to return results via JS function
      Android.useJavaScriptCallbackZebraScanner(true);
   }
}

function barcodeScanResult(data) {
   console.log(data);
}


Receiving Result and loading via Barcode Redirect URL

If the barcode data scanned contains a URL then it will automatically load this within Kiosk Browser/Launcher. If the data is just a string i.e. a product code "9549548L". This data will be returned and appended to the end of the Barcode Redirect URL as specified in Settings. So if the redirect URL is http://www.android-kiosk.com/stock.php?productcode= the resulting URL after scanning would be http://www.android-kiosk.com/stock.php?productcode=9549548L.

Alternative method via URL variable %BARCODEDATA%
Consider a scenario where the barcode data needs to be placed elsewhere (not at the end of a url). In this instance you can use a URL such as:
www.android-kiosk.com/scan/%BARCODEDATA%/moredata

The end result would be:

www.android-kiosk.com/scan/9549548L/moredata

Android 11 or higher Extra Steps

By default the Data Wedge Application automatically inserts all home apps into the profile "Launcher", this stops the barcode scanner from functioning when Kiosk Browser is running. Disabling the profile is not enough to restore functionality.

Open DataWedge application
Long press the profile Launcher
Tap delete/remove

Updated on: 18/10/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!