Using DataWedge Intents

Enterprise Browser 2.0

Overview

Apps running on Enterprise Browser 2.0 (and higher) can control DataWedge–Zebra's built-in scanning engine–using Android intents. This makes it possible to acquire barcode data from within an EB app without using EB's scanning APIs. This guide explains how to configure an EB app to scan and process barcode data using DataWedge intents and enter the captured data as keystrokes into any EB input field.

It's important to note that control of barcode scanning hardware is exclusive. When DataWedge is active, Enterprise Browser scanning APIs will be inoperable. Likewise, an Enterprise Browser app that uses those APIs will prevent other apps (including DataWedge) from accessing the scanner(s). This guide explains how to take control of a device's scanner hardware and to subsequently release it to other apps.

Requirements

  • Enterprise Browser 2.0 (or higher)
  • DataWedge 6.5 (or higher)

Which DataWedge version is installed?


DW 6.0.1 and higher

Important: Some versions of DataWedge 6.x automatically disable Enterprise Browser after every device reboot by adding it to the "Disabled apps list." If com.symbol.enterprisebrowser reappears in the Disabled apps list after reboot, it must be manually removed before EB can use DataWedge for scanning. The only alternative is to upgrade DataWedge, which for Android requires a new BSP (OS image). Such updates should be attempted only with the guidance of Zebra Support.

Use DataWedge for Scanning

To enable an EB app to scan with DataWedge 6.0.1 and higher:

1. Confirm that no association with com.symbol.enterprisebrowser exists in the "Disabled app list" in the DataWedge Settings panel:

  • In DataWedge, select Menu->Settings->Disabled app list. The list of disabled apps appears.

  • Remove com.symbol.enterprisebrowser from the list, if present (see note, above).

2. In the EB app's config.xml file, set a value of "1" in the <usedwforscanning> tag.

Use Enterprise Browser APIs for Scanning

To use a device scanner through an Enterprise Browser API:


Option 1: Disable DataWedge on the device
  1. Start DataWedge on the device.
  2. In DataWedge, select Menu->Settings.
  3. Uncheck the "DataWedge enabled" checkbox.
  4. In the EB app's config.xml file, set a value of "0" in the <usedwforscanning> tag.

DataWedge is now disabled and unavailable to any app on the device.

Note: DataWedge also can be disabled (or re-enabled) programmatically using DataWedge APIs.

Option 2: Disable DataWedge only for Enterprise Browser

To create and disable an Enterprise Browser Profile in DataWedge:

  1. Install the Enterprise Browser app that will use DataWedge.
  2. Start DataWedge.
  3. In DataWedge, select Menu->New Profile, Enter a Profile name and tap OK. The list of Profiles appears.
  4. Tap on the newly created profile.
  5. In the Applications section, tap Associated apps.
  6. Tap Menu->New app/activity. A list of apps/activities appears.
  7. From the list, select the package name of the EB app (i.e. com.symbol.enterprisebrowser) that will use DataWedge. The app activities list appears.
  8. From the app activities list, tap the asterisk (*) to associate all app activities with the Profile, or tap on an indvidual activity to use DataWedge only for that specific activity.
  9. Tap BACK to return to the Profile screen.
  10. Confirm that the Profile's "Profile enabled" box is checked.
  11. In the new Profile, uncheck the "Enabled" box for these three sections: Barcode input, Keystroke output and Intent output.
  12. In the EB app's config.xml file, set a value of "0" in the <usedwforscanning> tag.

DataWedge will now be disabled whenever an Enterprise Browser app is running.


Related guides: