capacitor-datawedge-plugin
v1.0.2
Published
Capacitor plugin for Zebra DataWedge - Complete Android implementation with 35+ API methods
Downloads
15
Maintainers
Readme
Capacitor DataWedge Plugin
Comprehensive Android implementation of Zebra DataWedge API for Capacitor applications.
Installation
npm install github:maxilosgr/capacitor-datawedge-plugin
npx cap syncDemo Application
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
Features
35+ Implemented Methods
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
Usage Example
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' });Events
scanReceived
Triggered when barcode/RFID data is scanned:
{
data: string; // Scanned data
labelType: string; // Barcode type (EAN13, CODE128, etc.)
timestamp: number; // Scan timestamp
}notificationReceived
Status and configuration change notifications:
{
type: string; // SCANNER_STATUS, PROFILE_SWITCH, etc.
data: any; // Notification-specific data
}DataWedge Configuration
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
Requirements
- Android: API 22+ (Android 5.1+)
- DataWedge: 6.0+ (11.4 recommended)
- Capacitor: 7.0.0+
- Device: Zebra/Symbol/Motorola with DataWedge
Version Compatibility
| 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 |
API Documentation
See the TypeScript definitions for complete API documentation.
Resources
- 📱 Demo Application - Full working example with UI
- 📖 DataWedge Documentation - Official Zebra docs
- 🐛 Report Issues - Bug reports and feature requests
Developer
Connect I.T - Gregorios Machairidis 2025
License
MIT
