Comprehensive Android implementation of Zebra DataWedge API for Capacitor applications.
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
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
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
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
registerForNotification()- Register for status notificationsunRegisterForNotification()- Unregister from notifications
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' });Triggered when barcode/RFID data is scanned:
{
data: string; // Scanned data
labelType: string; // Barcode type (EAN13, CODE128, etc.)
timestamp: number; // Scan timestamp
}Status and configuration change notifications:
{
type: string; // SCANNER_STATUS, PROFILE_SWITCH, etc.
data: any; // Notification-specific data
}Configure a DataWedge profile with:
- Intent Output: Enable with action matching your app (e.g.,
com.yourapp.SCAN) - Intent Delivery: Set to Broadcast (2)
- Associated App: Your app's package name
- Scanner Input: Enable desired scanner types
- 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