3
votes

I am trying to develop an android app for managing HID devices. Using UsbManager and getDeviceList() provided from google sdk and following the android sdk official documentation, I am in condition to set up a connection with various devices (as pen drives, external HD, usb "phone" etc.), but I am not in condition to connect the android smartphone to usb mouse and keyboard: they are not listed by getDeviceList() method at all, even if android OS is able to recognize and use it! In fact, I am using the mouse and the keyboard with the mobile without any problem. I am using for my test a samsung galaxy S4. Any one can give me some explanation about this, please? Thank you!

p.s.: I also tried to use app like "USB Host Diagnostic" and the result is the same: the app can not recognize connected mouse and keyboard...but mouse and keyboard are still working perfectly...

1

1 Answers

3
votes

Have you looked at Android Open Access Protocol yet? In the section titled HID Support:

The AOA 2.0 protocol adds four new USB control requests to allow the accessory to act as one or more HID input devices to the Android device. Since HID support is done entirely through control requests on endpoint zero, no new USB interface is needed to provide this support.

HTH.