从服务器发送消息到Android设备,反之亦然 [英] Send message from Server to Android device and vice versa

查看:207
本文介绍了从服务器发送消息到Android设备,反之亦然的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现一个聊天应用程序。但是,我有几个问题,我无法通过搜索互联网解决。

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

我的要求是:


  • 当然,我可以从我的服务器分别应对设备(有意义的聊天应用程序)

  • 我可以创建发送和接收消息之间的时间延迟

  • 应用程序不应该要求注册(这不是必须的,但将是很好)

我不知道是否GCM(谷歌云通讯)对我来说是合适的解决方案。我还没有与它的工作,所以我想有一定的帮助。我会遇到这个麻烦?还有最重要的:是否需要登记

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?

推荐答案

您会遇到一定的麻烦, GCM是不是创建聊天应用即可。您将需要此 XMPP .GCM是怎么样的东西用于广播消息,它甚至不保证消息的传递瞬间比如,您将被要求实时性。

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.

看到这个TOO: <一个href=\"http://stackoverflow.com/questions/4769020/android-and-xmpp-currently-available-solutions\">Android和XMPP:目前可用的解决方案

SEE THIS TOO: Android and XMPP: Currently available solutions

这篇关于从服务器发送消息到Android设备,反之亦然的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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