【发布时间】:2012-08-27 08:29:04
【问题描述】:
虽然我的设备没有互联网连接,但我正在使用 GCM 从服务器向应用程序发送消息。之后,当设备连接互联网时,我无法收到消息。正常吗?
来自http://developer.android.com/guide/google/gcm/adv.html
"如果设备未连接到 GCM,则消息将被存储,直到建立连接(再次遵守折叠密钥规则)。 "
我的消息具有相同的折叠键;但是当设备连接时,我仍然只需要收到一条消息。
【问题讨论】:
-
相同的折叠键意味着您将只收到 1 条消息:
if there is already a message with the same collapse key (and registration ID) stored and waiting for delivery, the old message will be discarded and the new message will take its place (that is, the old message will be collapsed by the new one) -
@Selvin 我无法收到此消息,我已经在未连接时仅从服务器向应用程序发送了一条消息。
-
sry 朋友,这是 google 告诉我的,我还没有将任何 c2dm 迁移到 GCM,所以对此不太确定——请检查网络连接何时恢复 google play 已登录
标签: android google-cloud-messaging