如何将一条公共 C2DM 消息发送到多个设备
我想通过 C2DM 向多个注册设备发送一条常见消息“新年快乐”。我从链接 http://code.google.com/android 对 C2DM 有一些想法/c2dm/index.html 并了解注册 C2DM 的每个设备都有不同的身份验证令牌和注册 ID。那么第三个应用服务器是否可以向所有注册的设备发送相同的消息。我正在使用从 http://code.google.com 下载的 Chrome 手机示例代码/p/chrometophone/source/checkout。
因此,任何人的任何帮助将不胜感激。
I want to send one common message say "Happy new year" through C2DM to more than one registered device. I have got few ideas about C2DM from the link http://code.google.com/android/c2dm/index.html and understood that each devices registered for C2DM they have different auth token and registration id. So is it possible for the third application server to send the same message to all the devices registered with. I am using the sample code for Chrome to phone downloaded from http://code.google.com/p/chrometophone/source/checkout.
So any help from any one would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
需要明确的是,这些设备没有身份验证令牌。您的应用程序服务器使用 ClientLogin 身份验证令牌向 C2DM 进行身份验证以发送推送。在注册期间,每个设备都会收到一个注册 ID,并将该 ID 传送到应用程序服务器。
目前C2DM不支持批量发送。您必须遍历您的设备并向每台设备发送相同的消息。
看
此帖子了解详情。
To be clear, the devices don't have authentication tokens. Your application server uses the ClientLogin auth token to authenticate with C2DM for sending pushes. During registration, each device receives a registration ID which it communicates to the application server.
At the moment, C2DM does not support batch sending. You will have to iterate through your devices and send each one of them the same message.
See
this thread for details.