Android Behavior
Konten ini belum tersedia dalam bahasa Anda.
Intent output is required
Section titled “Intent output is required”The plugin listens for scan results through Android broadcasts. Your Zebra DataWedge profile must:
- be associated with your app package
- enable
Intent Output - use
Broadcast Intentdelivery - send scans to the same action you pass into
softScanTrigger()
If those values do not match, the plugin can still manage profiles and query DataWedge state, but scan events will not reach your Capacitor app.
Scan events
Section titled “Scan events”Subscribe to the Capacitor scan listener to receive decoded data:
import { ZebraDataWedge } from '@capgo/capacitor-zebra-datawedge';
await ZebraDataWedge.addListener('scan', (event) => { console.log(event.data); console.log(event.labelType); console.log(event.source);});softScanTrigger(intentAction) waits for the next scan broadcast on the action you provide and resolves with that decoded payload.
Notifications
Section titled “Notifications”Use ZebraNotification.registerForNotification() when you need native scanner status or profile switch updates:
import { DataWedgeNotificationType, ZebraNotification,} from '@capgo/capacitor-zebra-datawedge';
await ZebraNotification.registerForNotification({ notificationType: DataWedgeNotificationType.SCANNER_STATUS, callback: (event) => { console.log(event.scannerStatus); },});Production notes
Section titled “Production notes”- DataWedge commands require Zebra’s
com.symbol.datawedgepackage to be present and enabled. softRfidTrigger()uses the first registered scan intent action. Register one before relying on RFID reads.- Keep one canonical intent action per scanning flow. That reduces mismatches between the DataWedge profile and your app listeners.