Send message from Server to Android device and vice versa

China☆狼群 提交于 2019-12-13 04:41:53

问题


I want to implement a chat application. But I have a few questions, which I could not solve by searching the internet.

My requests are:

  • Of course I can address each device individually from my server (makes sense for a chat app)
  • I can create a time delay between sending and receiving a message
  • The application should not require a registration (this is not a MUST, but would be nice)

I wonder if GCM (Google Cloud Messaging) is the appropriate solution for me. I have not yet worked with it, so I would like to have some help. Will I run into troubles with this? And most important: Is a registration required?


回答1:


You will run into troubles surely, GCM is not for creating chat applications . You will need this XMPP.GCM is kind of thing used for broadcasting messages,which does not even guarantee the delivery of messages instantaneously i.e real time which you will be requiring.

SEE THIS TOO: Android and XMPP: Currently available solutions



来源:https://stackoverflow.com/questions/26236066/send-message-from-server-to-android-device-and-vice-versa

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