如何在Android设备上从USB设备上的USB设备读取数据? [英] How to read data from usb device on android device in android?

查看:84
本文介绍了如何在Android设备上从USB设备上的USB设备读取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设计一个Android应用程序,在该应用程序中,它应该按照标准时间从与其连接的USB设备读取数据.怎么样?

解决方案

您可以使用一样,与设备处于主机"模式.

I want to design an android application, in which it should read data from an USB device connected to it per standard timings.Can I? How?

解决方案

You Can use USB HOST OR ACCESSORY MODE for communicating with a USB device:

Android supports a variety of USB peripherals and Android USB accessories through two modes: USB accessory and USB host.

In USB accessory mode, the external USB hardware act as the USB hosts. Examples of accessories might include robotics controllers; docking stations; diagnostic and musical equipment; kiosks; card readers; and much more.

In USB host mode, the Android-powered device acts as the host. Examples of devices include digital cameras, keyboards, mice, and game controllers. USB devices that are designed for a wide range of applications and environments can still interact with Android applications that can correctly communicate with the device.

Like go through this link for communicating with a device in HOST mode.

这篇关于如何在Android设备上从USB设备上的USB设备读取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆