public class DetectReader extends Object
| Modifier and Type | Field and Description |
|---|---|
IUsbEventListener |
usbDeviceListener |
| Constructor and Description |
|---|
DetectReader(Context context,
IUsbEventListener usbDeviceListener)
Constructor for DetectReader.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getUsbPermission() |
void |
start()
Starts the USB detection process by registering the USB broadcast receiver.
|
void |
stop()
Stops the USB detection process by unregistering the USB broadcast receiver.
|
void |
triggerDeviceAttached(UsbDevice device) |
void |
triggerDeviceDetached(UsbDevice device) |
public DetectReader(Context context,
IUsbEventListener usbDeviceListener)
context - The application context.usbDeviceListener - Callback to handle USB device events.public void start()
public void stop()
public String getUsbPermission()
public void triggerDeviceAttached(UsbDevice device)
public void triggerDeviceDetached(UsbDevice device)