Is there a way to communicate with USB devices on Android?

社会主义新天地 提交于 2020-01-01 09:04:12

问题


I have a really short question: Is it possible to communicate/use USB devices on Android OS? I assume it might be tablet device.

Lest say i want to connect some sort of USB card scanner to android tablet. Will it work? Do i need to write drivers by myself?

Thanks.


回答1:


First, you need a USB host port on your tablet. Except for On-the-Go (which is a special design that can be either host or device), it is not possible to connect two USB devices together. The incompatibility is electrical, no amount of software changes can make it work.




回答2:


Yes, some phones can work as hosts, like the DROID. Do a Google search for connecting a USB keyboard to an android phone, such as here: http://www.tombom.co.uk/blog/?p=124




回答3:


Yes, it will work, and you do not need to write drivers for the Android side. However, the device must support the open accessory protocol and must be able to supply power to the Android device. A development kit is available.

However: "Accessory mode is ultimately dependent on the device's hardware and not all devices support accessory mode."



来源:https://stackoverflow.com/questions/2815518/is-there-a-way-to-communicate-with-usb-devices-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!