Android USB Part API

Source: Internet
Author: User

API Overview

Usbmanager allows you to enumerate connected USB devices and "communicate" with them.

usbdevice represents a connected USB device and contains methods that have authentication information, interfaces, and access points for that device.

usbinterface represents an interface to a USB device that defines a series of functions about the device. A device can have one or more interfaces when it is "communicating".

usbendpoint represents an access point for an interface that is the communication channel for this interface. An interface can have one or more such access points, and generally are access points with both input and output bidirectional communication.

usbdeviceconnection represents a connection to the device that transmits data on the access point. This class allows you to send and return data in a synchronous or asynchronous manner.

Usbrequest an asynchronous request to "communicate" through the usbdeviceconnection and the device.

Usbconstants a USB constant about the definition of linux/usb/ch9.h in the Linux kernel.

In most cases, when communicating with a USB device, you need to use all of these classes (using asynchronous communication, only the Usbrequest class is required). Use the Usbmanager object to get the desired Usbdevice object. With this Usbdevice object, you need to find the corresponding Usbinterface object and the Usbendpoint object that is based on that interface. Once the correct endpoint is obtained, you can open the Usbdeviceconnect object to communicate with the USB device.

Android USB Part API

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.