public interface ISerialComUSBHotPlugListener
The interface ISerialComUSBHotPlugListener need to be implemented by class who wish to get notified whenever a specified USB device is added to the system or removed from the system.
Application should call registerUSBHotPlugEventListener method in SerialComManager class to register listener. Whenever an event occurs callback method onUSBHotPlugEvent() gets called containing event that occurred.
| Modifier and Type | Method and Description |
|---|---|
void |
onUSBHotPlugEvent(int event,
int USBVID,
int USBPID,
String serialNumber)
Whenever a USB device is plugged into system or unplugged from system, onUSBHotPlugEvent()
method will be called by native layer.
|
void onUSBHotPlugEvent(int event,
int USBVID,
int USBPID,
String serialNumber)
Whenever a USB device is plugged into system or unplugged from system, onUSBHotPlugEvent() method will be called by native layer.
The event value SerialComUSB.DEV_ADDED indicates USB device has been added to the system. The event value SerialComUSB.DEV_REMOVED indicates USB device has been removed from system.
USBVID will be 0, if SerialComUSB.DEV_ANY was passed to registerUSBHotPlugEventListener for filterVID argument. USBPID will be 0, if SerialComUSB.DEV_ANY was passed to registerUSBHotPlugEventListener for filterPID and serialNumber will be empty string if null was passed to registerUSBHotPlugEventListener for serialNumber argument.
event - integer value indicating whether a USB device was plugged or un-plugged from
system.USBVID - USB-IF vendor id of USB device for which this method is invoked.USBVID - Product id of USB device for which this method is invoked.serialNumber - serial number of USB device for which this method is invoked.Copyright © 2016. All rights reserved.