Android: Real time android application design

扶醉桌前 提交于 2019-12-21 02:47:07

问题


I'd like you to help me to choose the right technology that fits my requirements with least costs.

The android app needs to constantly send the data back to server (The data like heartbearts), as well as constantly receive the feedback data from server (Real-time data, streaming)

The data type can be number, text, or even graph.

I'm now looking at three technologies

  • MQTT
  • stomp+orbited
  • XAMPP

I'm not familiar with any of that, please give your suggestions, thank you.


回答1:


Realtime bi-direction full-duplex communication = WebSockets.

IMHO WebSockets will become the standard for server <-> client communication. It's still reasonably early in their development, in terms of non-browser solutions, but the amount of options available to developers is increasing all the time. jWebSockets look like a good solution for Android and there are a host of WebSocket servers that are available to choose from. I work for Pusher who offer a hosted WebSocket service and there are other similar services that you can investigate.

Have a look at this realtime technologies guide for a list of technologies (I'm trying to keep this up to date as much as possible as I find new technologies).




回答2:


For Android native apps, there is Autobahn WebSockets for Android

https://github.com/oberstet/AutobahnAndroid

It supports the final RFC6455, integrates well with UI and service apps, provides RPC and PubSub over WebSockets, and more. Check out the project README on GitHub.

Disclaimer: I am the author of Autobahn.




回答3:


I'd look at Google Buffer Protocol - it was used in an application that I worked on and was extremely fast for data transfer. It could be what you are looking for.



来源:https://stackoverflow.com/questions/7445421/android-real-time-android-application-design

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!