capacitor-zebra-rfid-plugin
v1.0.0
Published
Capacitor plugin for Zebra RFID Bluetooth readers (RFD40XX)
Maintainers
Readme
Capacitor Zebra RFID Plugin
Capacitor plugin for Zebra Bluetooth RFID readers (RFD40XX series) using the Zebra RFID SDK (API3).
Installation
npm install capacitor-zebra-rfid-plugin
npx cap syncZebra RFID SDK (required)
This plugin does not bundle the Zebra RFID SDK due to licensing. You must download it from Zebra Support and place the AAR files in your app's android/app/libs/ directory:
android/app/libs/
├── API3_ASCII-release-2.0.5.238.aar
├── API3_CMN-release-2.0.5.238.aar
├── API3_INTERFACE-release-2.0.5.238.aar
├── API3_LLRP-release-2.0.5.238.aar
├── API3_NGE-protocolrelease-2.0.5.238.aar
├── API3_NGE-Transportrelease-2.0.5.238.aar
├── API3_NGEUSB-Transportrelease-2.0.5.238.aar
├── API3_READER-release-2.0.5.238.aar
├── API3_TRANSPORT-release-2.0.5.238.aar
├── API3_ZIOTC-release-2.0.5.238.aar
└── API3_ZIOTCTRANSPORT-release-2.0.5.238.aarYour app's android/app/build.gradle must include:
repositories {
flatDir { dirs 'libs' }
}
dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
}Android Permissions
Add to your AndroidManifest.xml:
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />Usage
import { ZebraRfid } from 'capacitor-zebra-rfid-plugin';
// Discover available readers
const { readers } = await ZebraRfid.discoverReaders();
console.log('Found readers:', readers);
// Connect to a reader
const result = await ZebraRfid.connect({ address: readers[0].address });
console.log('Connected:', result.name, result.serial);
// Listen for tag reads
ZebraRfid.addListener('tagRead', (event) => {
console.log('Tag:', event.tagId, 'RSSI:', event.rssi);
});
// Listen for trigger events
ZebraRfid.addListener('triggerEvent', (event) => {
console.log('Trigger:', event.pressed ? 'pressed' : 'released');
});
// Listen for connection changes
ZebraRfid.addListener('connectionStatusChanged', (event) => {
console.log('Connected:', event.connected, event.readerName);
});
// Start/stop inventory manually
await ZebraRfid.startInventory();
await ZebraRfid.stopInventory();
// Configure reader
await ZebraRfid.configure({
transmitPower: 270,
session: 'S0',
filterDuplicates: true,
triggerMode: 'rfid',
});
// Check connection status
const status = await ZebraRfid.getConnectionStatus();
// Disconnect
await ZebraRfid.disconnect();API
Methods
| Method | Description |
|--------|-------------|
| discoverReaders() | Discover available Bluetooth RFID readers |
| connect({ address }) | Connect to a reader by Bluetooth address |
| disconnect() | Disconnect from the current reader |
| startInventory() | Start RFID tag inventory |
| stopInventory() | Stop RFID tag inventory |
| configure(options) | Configure reader settings |
| getConnectionStatus() | Get current connection status |
Events
| Event | Data | Description |
|-------|------|-------------|
| tagRead | { tagId, rssi } | RFID tag detected |
| connectionStatusChanged | { connected, readerName, serial, model, address } | Connection state changed |
| triggerEvent | { pressed } | Hardware trigger pressed/released |
Interfaces
interface ReaderInfo {
name: string;
address: string;
}
interface ConnectionResult {
connected: boolean;
name: string;
serial: string;
model: string;
address: string;
}Trigger Behavior
By default, the plugin automatically starts inventory when the hardware trigger is pressed and stops when released. This can be overridden via the configure() method.
Requirements
- Android: API 22+ (Android 5.1+)
- Capacitor: 7.0.0+
- Device: Zebra Bluetooth RFID reader (RFD40XX series)
- SDK: Zebra RFID SDK API3 v2.0.5.238 (must be provided by host app)
Developer
Connect I.T - Gregorios Machairidis 2026
License
MIT
