Getting Started
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-zebra-datawedge`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/zebra-datawedge/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
-
Install the plugin
Terminal window bun add @capgo/capacitor-zebra-datawedge -
Sync native platforms
Terminal window bunx cap sync android -
Configure DataWedge on the device
- Create or pick a Zebra DataWedge profile associated with your app package.
- Enable
Intent Output. - Set
Intent deliverytoBroadcast Intent. - Choose an action such as
app.capgo.zebra.SCAN.
-
Review Android behavior
- Read the Android notes before enabling soft triggers in production.
Basic setup
Section titled “Basic setup”import { DataWedgeConfigMode, DataWedgePlugin, ZebraConfiguration, ZebraDataWedge, ZebraRuntime,} from '@capgo/capacitor-zebra-datawedge';
const intentAction = 'app.capgo.zebra.SCAN';
await ZebraConfiguration.setConfig({ profileName: 'CapgoZebraProfile', profileEnabled: true, configMode: DataWedgeConfigMode.CREATE_IF_NOT_EXIST, appList: [ { packageName: 'com.example.app', activityList: ['*'], }, ], pluginConfigs: [ { pluginName: DataWedgePlugin.BARCODE, resetConfig: true, paramList: { scanner_selection: 'auto', scanner_input_enabled: 'true', }, }, { pluginName: DataWedgePlugin.INTENT, resetConfig: true, paramList: { intent_output_enabled: 'true', intent_action: intentAction, intent_delivery: 2, }, }, ],});
await ZebraDataWedge.addListener('scan', (result) => { console.log('Scanned', result.data, result.labelType);});
const result = await ZebraRuntime.softScanTrigger(intentAction);console.log(result.data);Main runtime groups
Section titled “Main runtime groups”ZebraConfigurationmanages profiles and disabled-app settings.ZebraNotificationregisters for DataWedge notification broadcasts such as scanner status and profile switches.ZebraQueryreads active profiles, associated apps, scanner status, scanner lists, and version info.ZebraRuntimeenables or disables DataWedge, switches scanners, and triggers scans.
Platform scope
Section titled “Platform scope”- Android: fully supported on Zebra devices with DataWedge installed.
- iOS: not available because DataWedge is Zebra Android specific.
- Web: not available beyond API shape parity.