Android应用程序,具有插入USB端口的设备进行通信 [英] Android apps, communicating with a device plugged in the USB port

查看:192
本文介绍了Android应用程序,具有插入USB端口的设备进行通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在想一个Android应用程序(有可能伴随物理设备),我试图找出这是否是东西是可行的。

I'm thinking about an Android app (with possibly an accompanying physical device), and i'm trying to figure out whether this is something that's feasible.

1)比方说,我插入我的Andr​​oid到我的电脑。是否有可能为在PC上安装一个应用程序在手机上运行的应用程序进行通信?我只需要一个非常简单的数据交换,它甚至可以是单向的(从手机推到了听音的应用程序在PC上仅仅是数据,只要手机想,我不需要从PC传送到手机的任何数据)。

1) Let's say I plug my Android to my PC. Would it be possible for an app installed on the PC to communicate with an app running in the cell phone? I just need a very simplistic data exchange, it can even be one-way (just data pushed from the cell phone to the listening app on the PC, whenever the cell phone wants, I don't need any data sent from PC to phone).

当我将其插入,手机给了我4个选项(充电,磁盘驱动器,宏达电同步,网络共享),这让我觉得这是不可行的,但还是值得出手。

When I plug it in, the phone gives me 4 options (charge, disk drive, HTC sync, tethering), which makes me think this is not doable, but still worth the shot.

2)是否有可能在PC上的应用程序通过任何其他方式来聊到了手机上的应用程序? (无线网络连接,蓝牙等)。我的Wi-Fi猜测没有,因为双方都没有对方的IP(我想这有点只是工作,不必输入IP地址手动所有的时间)。

2) Would it be possible for an app on the PC to talk to an app on the phone through any other way? (Wi-fi, bluetooth, etc). I'm guessing no on wi-fi since neither party has the other's IP (and I want this to kinda just work, not having to input IPs manually all the time).

3)如果我让已经插好了的小USB接口在手机底部,一个设备(让我们说这是一个神奇的装置,可以做任何事情,我不太在意这些细节,只要它是可行)。我能有一个Android应用程序的谈话给该设备?

3) If I make a device that's plugged to the little USB port at the bottom of the phone (and let's say this is a magical device that can do anything, I don't quite care about those details as long as it's doable). Can I have an Android app talk to that device?

4)任何其他的想法,使手机通话,以设备我做,或者在PC的应用程序非常欢迎。走出去通过网络可能是一个选项(虽然不得不是我自己作为一个中间人,我相信中央服务器)。但我想preFER如果通信是直接在两台设备间。

4) Any other ideas to make the phone talk to a "device" that I make, or to an app in the PC are more than welcome. Going "through the web" could be an option (although there'd have to be a central server that I own as a middle man, I believe). But i'd prefer if the communication was direct between the two devices.

非常感谢你的任何想法!
丹尼尔·

Thank you very much for any ideas!
Daniel

推荐答案

世界已经改变,因为这个问题被问,得到的答复是现在的 Android开放配件开发套件。它不会解决现有的USB设备的问题,但它能够创建可以使用Android设备的USB连接新设备。

The world has changed since this question was asked, and the answer is now the Android Open Accessory Development Kit. It won't solve the problem for existing usb devices, but it makes it possible to create new devices that can use an Android device's USB connection.

这篇关于Android应用程序,具有插入USB端口的设备进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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