Skip to main content

Installation

Zebra Scanner plugin is only available for projects running Capacitor 3 or later.

Follow these steps to install Zebra Scanner into your app.

npm install @ionic-enterprise/zebra-scannernpx cap sync

Getting Started#

To get started, make sure to properly configure your DataWedge profile through the DataWedge application provided on the Zebra device.

  1. Add your application to the profile's associated apps.
  2. Enable Intent Output.
  3. Set Intent Delivery to Broadcast Intent.
  4. Set the Intent Action. The intent action is customizable, but should remain consistent across your application. This setting will allow the app to register for notifications and listen for scanner events through the hardware triggers.

NOTE: If the DataWedge profile is not set up properly, you will not be able to receive scanner events through your application.

For more information, reference https://techdocs.zebra.com/datawedge/latest/guide/output/intent/

While the Zebra Scanner plugin supports all of the functionality provided by the DataWedge API, the simplest usecase is to simply register your application to listen for scanner events. This is done simply by importing the plugin, and prompting your connected device for a scan.

import { ZebraRuntime } from "@ionic-enterprise/zebra-scanner";
const intentAction = 'io.ionic.starter.ACTION';const result = await ZebraRuntime.softScanTrigger(intentAction);