- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我想设计一个 android 应用程序,它应该在其中按照标准时序从连接到它的 USB 设备读取数据。我可以吗?怎么办?
最佳答案
您可以使用 USB HOST OR ACCESSORY MODE用于与 USB 设备通信:
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.
喜欢这个link用于在主机模式下与设备通信。
关于android - 如何在android中从android设备上的usb设备读取数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15172651/
我是一名优秀的程序员,十分优秀!