Skip to content

How can I use the barcode scanner with Fully? ​

Using an External or Integrated Hardware Barcode Scanner ​

External or integrated QR code scanners usually have a control app like Datawedge. By default the scanner usually emulates the keyboard and can enter the scanned code into the web fields. However the web field must be enabled and focused for this. The code must be something textual, binary values will cause issues. In many cases however this could be a sufficient integration.

Fully Kiosk supports different ways for a better integration with external scanner apps or hardware QR scanners. Check Barcode Scanner Settings in Other Settings. You can let Fully Kiosk:

  • Listen to the broadcast intent (RECOMMENDED) – many apps like Datawedge can send a broadcast intent when the barcode is scanned. It’s difficult to give exact steps for the Configuration as the external scanner app can slightly change depending on its version. Look in your scanner app docs or look in the app settings for a Broadcast Action name and String Extra name and put those names into these options in Fully Kiosk Settings in order to listen to the broadcasts.
    • Barcode Scan Broadcast Intent Action – broadcast intent action from scanner app to listen for, empty for none. In devices using Datawedge app this can be something user defined or something  like com.datalogic.decodewedge.decode_action
    • Barcode Scan Broadcast String Extra – broadcast intent string extra from scanner to look for the scanned code in. In devices using Datawedge this can be something like com.symbol.datawedge.data_string or com.datalogic.decode.intentwedge.barcode_string

If you can specify the intent category in your scanner app then keep it empty.

  • Listen to activity intent – some  barcode scanners can send explicit activity intents when a barcode is scanned. Use de.ozerov.fully.action.barcode as the action and put the barcode in the Intent String Extra code, or specify the String Extra Name in the Fully’s String Extra option.
  • Listen to keyboard input from scanner – useful with many hardware scanners that can emulate keystrokes when scanning a barcode (sometimes called keyboard mode or keystroke output). Look in your scanner app settings. This option should catch the input even without a focused web field however it isn’t working reliably with some scanner apps and isn’t recommended.

Note that the barcode readers may be unavailable if you use the Unlock Screen option in Fully Kiosk (enabled by default) until you unlock the screen manually.

Check below how to handle the resulting barcode.

Using Device Camera as Barcode Scanner ​

You can use the integrated camera of the device for QR code scanning. You can start the QR Scanner using the JavaScript interface scanQrCode() or the QR scan button on the action bar.

With JS API you can specify the prompt text and target URL, the camera ID, the timeout, enable/disable beep sound and show/hide the cancel button in the barcode reader UI using scanQrCode() function. Don’t forget to enable the Enable QR Code Scanner option in Advanced Web Settings. The HTML code sample for triggering barcode scanning:

<a href="javascript:fully.scanQrCode('Nice prompt text', 'https://domain.com/target/url/$code', -1, 60, true, true);">SCAN</a>

Handling Resulting Barcode ​

For handling the scanned barcode from barcode app or device camera you can use Barcode Scan Target URL, Insert Barcode Into Website and Submit Form after Inserting options. Look in the Configuration how to use these options. Also JS API and MQTT events will be sent.

Hiding the Soft Keyboard ​

If your website has a focused field for barcode input the Webview will always show the virtual (soft) keyboard by default.

You can disable popping up the soft keyboard by switching off the Enable Text Input or switching on the Always Hide Keyboard option in Advanced Web Settings. This makes the keyboard unusable on all websites however. Or you can use an app like Null Keyboard to switch off the soft keyboard system wide.

You can disable keyboard for selected pages only by using the Fully JavaScript Interface and Inject JavaScript option with a code like this:

if (location.href=="https://url_of_barcode_scan_page")
  fully.setBooleanSetting("softKeyboard", false);
else
  fully.setBooleanSetting("softKeyboard", true);

Note that disabling keyboard can make the keyboard emulation mode (keystroke mode) and the Listen to Keyboard Input option not working with many scanner apps. We recommend using the broadcast mode to transmit the scan result as described above.

Using External App as Barcode Scanner ​

You can use a different barcode app like ZXing Barcode Scanner for scanning barcodes and getting codes back to web. The app must support zxing: URL scheme. Enable Open URL Schemes in Other Apps option in Fully’s Web Content Settings and use this HTML code to make a scan button:

<a href="zxing://scan/?ret=http://mydomain.com/path/to/page.html?item={CODE}">Scan Barcode</a>

After a barcode is scanned the scanner app will proceed to the specified return URL. Select Fully Kiosk Browser to be always the browser for handling this URL when asked. If another browser app is opened for the URL you have to clear defaults in the app settings for that browser app.