如何WhatsApp的克服GCM推送通知推迟? [英] How Does WhatsApp overcome the GCM Push notifications delay?

查看:696
本文介绍了如何WhatsApp的克服GCM推送通知推迟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用GCM服务,每一件事情是,GCM推送通知或提供有效载荷......有些时候,它需要我的应用程序5分钟收到通知或有效载荷的长期拖延,除了确定。 我需要立即提供... 我知道GCM的角色,即等到其他设备上网了,但对我来说我认为两个设备,他们是在网上,但我得到了延迟通知!

I am trying to use GCM service, Every thing is OK except of the long delay that GCM push notification or deliver payload... some times it take to my App 5 minutes receive notification or payload. I need Immediate delivering... I know about the roles of GCM, that wait until the other device got online, but in my case I hold two devices and they are online, but I got Delayed notifications!

如何WhatsApp的(如示例应用程序使用GCM)的解决这个问题..并立即发送?

How does WhatsApp(as example of app that uses GCM) overcome this problem.. and send Immediately?

[即(类型的消息:打字,在线 - 最后看)不能拖...]

[ i.e (message of the type: typing, online - last seen) cannot be delayed...]

在GCM延迟推已知问题:<一href="https://productforums.google.com/forum/#!category-topic/nexus/connecting-to-networks-and-devices/fslYqYrULto%5B1-25-false%5D">this问题 我的问题是:使用GCM如何其他应用程序解决这个问题

the GCM Delayed Push is known problem : this issue my question is: How other app that use GCM overcome this issue

推荐答案

当你发送通知,你可以设置的优先级参数为高。

When sending your notification you could set the priority-parameter to "high".

从文档:

在默认情况下,消息发送正常优先级。 普通优先级优化了客户端应用程序的电池消耗,应该使用,除非立即交货是必需的。对于正常优先级的消息,该应用程序可能会收到消息未指定的延迟。

By default, messages are sent with normal priority. Normal priority optimizes the client app's battery consumption, and should be used unless immediate delivery is required. For messages with normal priority, the app may receive the message with unspecified delay.

当邮件发送是高优先级,它立即发送,然后应用程序可以唤醒一个沉睡的设备,并打开网络连接到服务器。

When a message is sent with high priority, it is sent immediately, and the app can wake a sleeping device and open a network connection to your server.

我知道这个答案来晚了,不过如果你仍然面临这个问题(或其他人),请告诉我,如果它帮助。

I know this answer comes late, nevertheless if you are still facing this issue (or anyone else) please tell me if it helps.

这篇关于如何WhatsApp的克服GCM推送通知推迟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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