Overview
This sample demonstrates how to use DataWedge to receive scanned barcode data through an Android intent.
Available actions in this sample:
- Display the following for each decoded barcode:
- scan source
- scan data
- decoder type
Note: This application is intended for demonstration purposes only. It is provided as-is without guarantee or warranty and may be modified to suit individual needs.
APIs Used
DataWedge API |
App Functionality |
None |
None |
Requirements
- DataWedge (built-in all Zebra devices) is running on the device.
- DataWedge profile created and associated with this sample app. See instructions below.
Using This Sample
Configure DataWedge to output scans via intent:
Launch the DataWedge via Apps > DataWedge.
Select a Profile, e.g. Profile0 which is used for all apps not explicitly assigned a profile.
Confirm the following settings:
- The profile is enabled
- Barcode input is enabled
- Intent output is enabled
Configure the intent output as follows:
- Intent action: com.basicintent1.ACTION (to match value defined in the
strings.xml
file)
- Intent category: (leave blank)
- Intent delivery: Broadcast intent
Figure 1: Profile settings
Using the app:
Download, build, and launch the sample app.
Figure 2: App screen
Scan a barcode. The data fields are populated:
Figure 3: App screen with captured data
Related guides: