Android设备和PC之间通过USB双向数据传输(Mac或Windows) [英] Bi-directional data transfer through USB between an Android device and a PC (Mac or Windows)
问题描述
我是新来的Android编程。
我需要的数据双向通过USB Android平板电脑和PC(Mac或Windows)之间传输。
在Android平板电脑将拥有的Android 4.0或更高版本。
苹果将OS X Lion的或更新,Windows将使用Windows XP或更高版本。
I am new to Android programming. I need to transfer data bi-directionally over USB between an Android tablet and a PC (Mac or Windows). The Android tablet will have Android 4.0 or newer. Mac will have OS X Lion or newer and Windows will have Windows XP or newer.
阅读有关Android的这里USB连接的支持后:的http:// developer.android.com/guide/topics/connectivity/usb/index.html
After reading about Android's support for USB connectivity here: http://developer.android.com/guide/topics/connectivity/usb/index.html
如果我得到了USB附件模式的Android平板电脑运行,使PC主机,通过USB双向数据传输可以工作,我正在考虑。是思想正确与否,我在这里下车的方式?
I'm thinking if I get the Android tablet run in USB accessory mode and make the PC the host, bi-directional data transfer over USB can work. Is that thinking correct or I'm way off here?
感谢。
推荐答案
您最好的选择可能是文件的亚行推/拉(假设这是要转移的)。您的Windows端应用程序将有亚洲开发银行和AdbWinApi.dll作为资产和OSX版本将拥有的Mac OS ADB二进制...
有明显的缺点,如必须有在设备上启用开发人员选项,并从Android SDK中的主机上的pre-现有副本可能干扰(通常不太可能,但可能的!)
Your best bet is probably ADB push/pull of files (assuming that's what you want to transfer). Your Windows-side application would have adb and AdbWinApi.dll as assets, and the OSX version would have the Mac OS ADB binary... There are obvious downsides such as having to have Developer options enabled on the device, and possible interference from a pre-existing copy of the Android SDK on the host machine (typically very unlikely, but possible!)
更先进:根据环境的不同,你甚至会想看看从省略不必要的功能源构建自己的亚行版本
More advanced: Depending on the environment, you may even want to look into building your own version of ADB from source with unnecessary features omitted.
这篇关于Android设备和PC之间通过USB双向数据传输(Mac或Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!