繁体   English   中英

安卓usb通讯活动自动运行

[英]Android usb communication activity automatic run

我正在开发 USB 通信应用程序(使用 arduino)

当 USB 设备连接到 android 手机时,我的应用程序会自动运行

我不想在 USB 连接时自动运行我的应用程序

请帮我

对不起我的英语水平

在 android 中,您可以使用 BroadcastReceiver 来检测连接的 USB 设备,参见 ie 在 Broadcastreceiver 中检测 USB - 我错过了什么? 或者 http://www.codepool.biz/how-to-monitor-usb-events-on-android.html

USB 很复杂,请参阅 http://www.beyondlogic.org/usbnutshell/usb1.shtml

主机和设备之间是有区别的,在像智能手机这样的设备上,USB主机模式被称为 USB OTG(on-the-go),在大多数情况下,当连接到 arduino 时,你的 android 是主机

http://developer.android.com/guide/topics/connectivity/usb/index.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM