Native Motorola/Zebra Barcode-Scanner with a Neptune Application

This guide aims to enable the use of Hardware specific scanners on Motorola/Zebra Android devices.


The Datawedge application must be installed on the device.


Enable the Datawedge plugin

Add the following to the config.xml file in the mobile build custom config.xml:

<plugin name="motorola-datawedge-cordova-plugin" source="npm"/>
<platform name="android">
  <preference name="AndroidLaunchMode" value="singleTop"/>

Add the event listener to your app

The below snippet can be added to you init script:

document.addEventListener("deviceready", function() {

    if (window.datawedge) {

        datawedge.start(); //uses default

        datawedge.registerForBarcode(function(data) {

            var labelType = data.type,
                barcode = data.barcode;

            //"Barcode scanned.  Label type is: " + labelType + ", " + barcode);
            // Do your stuff with the scanned barcode here

Configure the Datawedge App

All that is left is to adjust and configure your Datawedge application:

  • Set up a Datawedge profile

  • Associate your application to the profile

  • Enable intent output

  • Set Intent action to com.bluefletch.motorola.datawedge.ACTION

  • Set Intent delivery to Broadcast intent

  • Intent category must be left empty


You have achieved to utilize Motorola/Zebra barcode scanners seamlessly within a Neptune Application.