USB数据线交际中的Android [英] Usb data cable comunication in Android
问题描述
我要的comunicate我从我的电脑的Android应用程序与USB数据线。我应该执行什么监听器...
I want to comunicate with my android application from my computer with the usb data cable. What listener should i implement ...
我觉得一个TCP连接将适合我的需要,但与它连接在ADB驱动似乎akward的。
I think a TCP connection will suit my needs but connecting with it over the adb driver seems akward.
在如何从窗户的comunicate使用数据线到Android任何IDEEA是值得欢迎的。
Any ideea on how can i comunicate from windows to android using a data cable is welcome
推荐答案
我找到了一个不错的职位有关此主题的此处。你基本上需要,以做Android设备和PC之间的端口转发ADB。作为一个例子:
I found a nice post about this subject here. You basically need adb in order to do the port forwarding between the Android device and the PC. As an example:
C:\android-sdk-windows\tools\adb.exe forward tcp:38300 tcp:38300
然后就可以使用标准的socket编程,无论是在Android设备和PC。
Then you can use standard socket programming, both in the Android device and in the PC.
这篇关于USB数据线交际中的Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!