XMPP(的Openfire)推送通知的Andr​​oid [英] XMPP (Openfire) Push Notifications Android

查看:230
本文介绍了XMPP(的Openfire)推送通知的Andr​​oid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的想找到解决这个问题,但没有。有与此相关的概念的某些线程,但我没有找到一个COM prehensive解决方案。

I really tried to find a solution to this problem but didn't. There are some threads related to this concept, but I didn't find a comprehensive solution.

我有一个Openfire的服务器,发送消息。当两个用户是否在线,是没有问题的。但是,当用户离线我想送一个推送通知,如WhatsApp的。我听说,WhatsApp的和其他的IM应用程序使用ejabber的修改版本发送推送通知,但无法找出如何。

I have a server with Openfire which sends messages. When both users are online, there is no problem. However, when a user is offline I would like to send a push notification, as in Whatsapp. I heard that Whatsapp and other IM apps use a modified version of ejabber to send push notifications, but couldn't find out how.

一种可能是使用GCM,但我不知道这是否是正确的道路要走。此外,我想,以避免投票,为了不耗尽电池的寿命。

One possibility is to use GCM, but I am not sure if this is the right way to go. Also I would like to avoid polling, for the sake of not draining battery life.

有谁知道一些解决这个还是有一个例子吗?

Does anyone know some solution to this or has an example?

推荐答案

好了,你可以使用GCM与XMPP。 新 GCM云连接服务器可以让你用一个双向XMPP协议(云到设备和设备您的服务器和你的Andr​​oid的应用程序之间进行云)通信。

Well, you could use GCM with XMPP. The new GCM Cloud Connection Server allows you to use the XMPP protocol for a bidirectional (Cloud to Device and Device to Cloud) communication between your server and your Android application.

在GCM云连接服务器(CCS)允许第三方服务器   与Android设备通过建立一个持续TCP   使用XMPP协议谷歌服务器的连接。本   通信是异步的,双向的。

The GCM Cloud Connection Server (CCS) allows third party servers to communicate with Android devices by establishing a persistent TCP connection with Google servers using the XMPP protocol. This communication is asynchronous and bidirectional.

这篇关于XMPP(的Openfire)推送通知的Andr​​oid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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