Skip to content

Getting Started

GitHub
  1. Install the plugin

    Terminal window
    bun add @capgo/capacitor-zebra-datawedge
  2. Sync native platforms

    Terminal window
    bunx cap sync android
  3. Configure DataWedge on the device

    • Create or pick a Zebra DataWedge profile associated with your app package.
    • Enable Intent Output.
    • Set Intent delivery to Broadcast Intent.
    • Choose an action such as app.capgo.zebra.SCAN.
  4. Review Android behavior

    • Read the Android notes before enabling soft triggers in production.
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);
  • ZebraConfiguration manages profiles and disabled-app settings.
  • ZebraNotification registers for DataWedge notification broadcasts such as scanner status and profile switches.
  • ZebraQuery reads active profiles, associated apps, scanner status, scanner lists, and version info.
  • ZebraRuntime enables or disables DataWedge, switches scanners, and triggers scans.
  • 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.

If you are using Getting Started to plan native plugin work, connect it with Using @capgo/capacitor-zebra-datawedge for the native capability in Using @capgo/capacitor-zebra-datawedge, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, and Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives.