USB interface in android

前端 未结 5 1872
天命终不由人
天命终不由人 2021-02-06 10:02

I rooted my device and working in host mode. I can able to detect the usb device connected to my tab but Am having two questions.

1) i try to display my device name usi

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-06 10:51

    1. getVendorId() should give you manufacturer's name. Other calls include getDeviceName(), getDeviceId(), getDeviceClass(), getDeviceSubclass(), getDeviceProtocol(), getProductId(). refer this link: Android USB Host

    2. For Data Transfers, refer this link: BulkTransfer. Read from the file in a buffer and pass the buffer to bulkTransfer call along with specific output Endpoint of your device and data length.

提交回复
热议问题