Capacitor plugin for Zebra DataWedge - Complete Android implementation with 35+ API methods
npm install capacitor-datawedge-pluginComprehensive Android implementation of Zebra DataWedge API for Capacitor applications.
``bash`
npm install github:maxilosgr/capacitor-datawedge-plugin
npx cap sync
š± Try the Demo App
A comprehensive demo application is available that showcases all 35+ plugin methods with a complete UI implementation. The demo app provides:
- Working examples of every API method
- 5-tab interface for different feature categories
- Real-time barcode scanning demonstration
- Profile configuration examples
- Complete source code for reference
Clone and run: git clone https://github.com/maxilosgr/capacitor-datawedge-plugin-demo-app.git
#### Configuration Management (9 methods)
- createProfile() - Create new DataWedge profilecloneProfile()
- - Clone existing profile with all settingsrenameProfile()
- - Rename existing profiledeleteProfile()
- - Delete profileimportConfig()
- - Import configuration from filerestoreConfig()
- - Reset to factory defaultssetConfig()
- - Update profile configurationsetDisabledAppList()
- - Manage blocked appssetIgnoreDisabledProfiles()
- - Control disabled profile behavior
#### Query Operations (10 methods)
- getVersionInfo() - Get DataWedge version detailsgetDatawedgeStatus()
- - Check enabled/disabled statusgetScannerStatus()
- - Get scanner stategetActiveProfile()
- - Get current profile namegetProfilesList()
- - List all profilesenumerateScanners()
- - List available scannersgetAssociatedApps()
- - Get apps linked to profilegetConfig()
- - Get profile configurationgetDisabledAppList()
- - Get blocked apps listgetIgnoreDisabledProfiles()
- - Get ignore setting
#### Runtime Operations (14 methods)
- enableDatawedge() / disableDatawedge() - Control DataWedge serviceenableScannerInput()
- / disableScannerInput() - Control scanner inputsoftScanTrigger()
- - Trigger barcode scan programmaticallysoftRfidTrigger()
- - Trigger RFID scan programmaticallyswitchToProfile()
- - Switch active profileswitchScanner()
- - Change active scannerswitchScannerParams()
- - Temporarily modify scanner settingssetDefaultProfile()
- - Set default profileresetDefaultProfile()
- - Reset to Profile0enumerateTriggers()
- - List hardware triggersnotify()
- - Play notification (beep/vibrate/LED)setReportingOptions()
- - Configure reporting
#### Notification Management (2 methods)
- registerForNotification() - Register for status notificationsunRegisterForNotification()
- - Unregister from notifications
`typescript
import { DataWedge } from 'capacitor-datawedge-plugin';
// Initialize scanner
await DataWedge.enableDatawedge();
await DataWedge.enableScannerInput();
// Register scan listener
await DataWedge.registerScanListener();
// Listen for scan events
DataWedge.addListener('scanReceived', (event) => {
console.log('Barcode:', event.data);
console.log('Type:', event.labelType);
});
// Create and configure profile
await DataWedge.createProfile({ profileName: 'MyApp' });
const config = {
profileName: 'MyApp',
profileEnabled: true,
configMode: 'UPDATE',
config: {
PLUGIN_CONFIG: {
PLUGIN_NAME: 'INTENT',
PARAM_LIST: {
intent_output_enabled: 'true',
intent_action: 'com.yourapp.SCAN',
intent_delivery: '2'
}
}
}
};
await DataWedge.setConfig(config);
// Trigger scan programmatically
await DataWedge.softScanTrigger({ action: 'START_SCANNING' });
`
typescript
{
data: string; // Scanned data
labelType: string; // Barcode type (EAN13, CODE128, etc.)
timestamp: number; // Scan timestamp
}
`$3
Status and configuration change notifications:
`typescript
{
type: string; // SCANNER_STATUS, PROFILE_SWITCH, etc.
data: any; // Notification-specific data
}
`DataWedge Configuration
Configure a DataWedge profile with:
1. Intent Output: Enable with action matching your app (e.g.,
com.yourapp.SCAN`)- Android: API 22+ (Android 5.1+)
- DataWedge: 6.0+ (11.4 recommended)
- Capacitor: 7.0.0+
- Device: Zebra/Symbol/Motorola with DataWedge
| DataWedge | Features |
|-----------|----------|
| 6.0+ | Basic scanning, enable/disable |
| 6.3+ | Scanner enumeration |
| 6.4+ | Profile creation |
| 6.5+ | Configuration management |
| 6.6+ | Scanner input control |
| 6.7+ | Import/export |
| 7.0+ | RFID support |
| 11.4+ | Full feature set |
See the TypeScript definitions for complete API documentation.
- š± Demo Application - Full working example with UI
- š DataWedge Documentation - Official Zebra docs
- š Report Issues - Bug reports and feature requests
Connect I.T - Gregorios Machairidis 2025
MIT