https://developer.android.com/guide/topics/connectivity/usb/host.html
Class | Description |
---|---|
UsbManager |
Allows you to enumerate and communicate with connected USB devices. |
UsbDevice |
Represents a connected USB device and contains methods to access its identifying information, interfaces, and endpoints. |
UsbInterface |
Represents an interface of a USB device, which defines a set of functionality for the device. A device can have one or more interfaces on which to communicate on. |
UsbEndpoint |
Represents an interface endpoint, which is a communication channel for this interface. An interface can have one or more endpoints, and usually has input and output endpoints for two-way communication with the device. |
UsbDeviceConnection |
Represents a connection to the device, which transfers data on endpoints. This class allows you to send data back and forth sychronously or asynchronously. |
UsbRequest |
Represents an asynchronous request to communicate with a device through a UsbDeviceConnection . |
UsbConstants |
Defines USB constants that correspond to definitions in linux/usb/ch9.h of the Linux kernel. |
In most situations, you need to use all of these classes (UsbRequest
is only required if you are doing asynchronous communication) when communicating with a USB device. In general, you obtain a UsbManager
to retrieve the de