当网络关闭时,本地存储的上行流不会在JB& ICS(它们正在重启) [英] Locally stored upstreams when network is down, are not sent on network up on JB & ICS (they are on reboot)

查看:95
本文介绍了当网络关闭时,本地存储的上行流不会在JB& ICS(它们正在重启)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的场景。


当网络出现故障时,GCM客户端本地存储设备到云消息(上游) (它的长度似乎是20,虽然没有说明)。

当这个队列已满时,消息被本地丢弃,并且intent包含消息类型 MESSAGE_TYPE_SEND_ERROR +关于哪个messageId已被删除,以及 error = TooManyMessages



使用gcm.send的TTL'd版本,可以强制上游始终被丢弃(网络关闭时)而不是排队(消息类型 MESSAGE_TYPE_SEND_ERROR + extras关于哪个messageId已被删除,并且 error = SERVICE_NOT_AVAILABLE ),这并不是我想要的。

到目前为止,这么好。
问题是,在JB(4.1.2& 4.2.2)&当网络关闭时,ICS(4.0.4)排队的消息在网络重新启动时不会发送。重新启动会强制它们被发送。更糟糕的是,一旦队列满了,即使网络启动,也不能再发送消息。这里再次需要重新启动。
看起来像一个刷新在某处丢失。



这完美地适用于KK 4.4.2



<在任何测试设备上,谷歌播放服务APK都是最新的。



任何人都可以在JB& ICS,也许还有其他版本?
是否有解决方法?
Thanks。

解决方案

来自Google的最新升级解决了此问题。



我并不确切知道哪个组件升级了,但所有以前测试过的版本都没有问题。


Here is my scenario.

When network is down, GCM client locally stores device-to-cloud messages (upstream), in a local queue (it's length seems to be 20, although never stated).

When this queue is full, messages are locally discarded and the intent contains the message type MESSAGE_TYPE_SEND_ERROR + extras about which messageId was deleted, and error=TooManyMessages.

Using the TTL'd version of gcm.send, allows to force upstreams to be always discarded (when network is down) instead of queued (message type MESSAGE_TYPE_SEND_ERROR + extras about which messageId was deleted, and error=SERVICE_NOT_AVAILABLE), which is not what i want.

So far, so good. Problem is, on JB (4.1.2 & 4.2.2) & ICS (4.0.4), queued messages while network is down, are not sent when network is up again. A reboot forces them to be sent. And worse, once the queue is full, messages can't be sent anymore, even when network is up. Here again a reboot is necessary. Looks like a "flush" is missing somewhere.

This works perfectly on KK 4.4.2

On every test devices, google play service APK is up to date.

Can anyone confirm this behavior in JB & ICS, and maybe other version? Is there a workaround? Thanks.

解决方案

Latest upgrade from Google solved the issue.

I don't precisely know which component upgrade did it, but the issue is gone on all previously tested versions.

这篇关于当网络关闭时,本地存储的上行流不会在JB&amp; ICS(它们正在重启)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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