需要 C2DM crash_key 实现说明
你好 我看不到对 crash_key 的实现的任何解释。 我想我明白它的作用,但不明白它是如何做的! Android 云到设备消息传递框架
我设置了一个 C2DM 框架并向多部手机发送 4 种类型的消息。
非常基本的字符串消息看起来有点像这样:
type:name:uuid
type:name:uuid:number
type:uuid:id
如果电话关机,许多消息可能会堆积起来等待电话上线。 据我所知,我的系统可以工作,但是崩溃密钥在这里会为我做什么?
addEncodedParameter(sb, "collapse_key", "no_ide_what_to_put_here");
hi
I cannot see any explanation of the implementation of the collapse_key.
I think i understand what it does but not how it do it!
Android Cloud to Device Messaging Framework
I have a C2DM framework set up and sending 4 types of messages to many phones.
String messages very basic looks kind of like this:
type:name:uuid
type:name:uuid:number
type:uuid:id
If the phone is off many of this can get piled up waiting for phone on-line.
as far as i can tell my system works but what will the collapse_key do for me here?
addEncodedParameter(sb, "collapse_key", "no_ide_what_to_put_here");
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您提到重试同一消息 3 次并使用相同的键值。它实际上不必是相同的消息。例如,如果您收到一条指示股票当前价格的消息,并且您实际上只关心最新价格,那么您可以使用相同的密钥发送不同的消息。当设备重新上线时,它只会收到最新的报价消息。
这可能是您已经说过的,但想澄清这不仅仅是为了“重试发送相同的消息”。
You mentioned retrying the same message 3 times and using the same key value. It doesn't really have to be the same message. If you've got a message that indicates the current price of a stock, for instance, and you really only care about the latest price, then you could send different messages with the same key. When the device comes back online, it only gets the latest price quote message.
This may have been what you were saying already, but wanted to make it clear it's not only for "retrying sending same message".
我发现这个文本:“collapse key”用于覆盖 Google C2DM 服务器上具有相同密钥的旧消息”我想如果我重试发送相同的消息 3 次我必须使用相同的密钥值。Google 云服务器将发送最新的消息具有相同的键值
I found this text: “collapse key” used for overriding old messages with the same key on the Google C2DM servers" I think if im retrying sending same message 3 times I must use same key value right. Google cloud server will send the latest msg with the same key value
...但请注意以下内容(来自 http://code.google .com/intl/sv-SE/android/c2dm/):
“请注意,由于无法保证消息发送的顺序,因此“最后”消息实际上可能不是由应用程序服务器。”
但如果您不生成大量消息,也许这不是问题。
...but be aware of the following (from http://code.google.com/intl/sv-SE/android/c2dm/):
"Note that since there is no guarantee of the order in which messages get sent, the "last" message may not actually be the last message sent by the application server."
But maybe this is not an issue if you don't generate a lot of messages.