开发者

Ways to communicate from Android to PC?

I am building an app that requires realtime data generated on an An开发者_C百科droid to be available to an application running on a PC. I suspect that network calls to a web service would be too slow. What other protocols/technologies exist? Bluetooth? Is there a good API for communicating over the USB connection? (Although it would be nice not to have to do that.)


Dunno about bluetooth, I'd try to use the network somehow.

The fastest, realtime way over a network would be to use 'Socket Programming' (peer-to-peer) between your android and a PC. Networks are plenty fast. People play real-time first person shooters against eachother this way. I doubt you'd have more data to transfer than that.

If you don't need realtime perhaps you can utilize a web service.


I havent really seen any mention of usb connection to the pc using app anywhere, but you might want to try network based connection locally (using wifi) which might speed up the network connectivity. And i am not totally sure about this, but android ndk -> http://developer.android.com/sdk/ndk/overview.html might be useful in this case. Good luck :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜