云到设备消息传递 (C2DM) 如何工作?
有人可以向我解释一下谷歌推送服务是如何工作的吗? 我知道谷歌与其服务器有持久连接,但为什么持久连接不会耗尽电池电量呢?
据我所知,另一边的轮询不断地唤醒系统并启动无线电。但这与持续连接到谷歌服务器有什么不同呢? 据我了解,您需要一个永久的活动无线电来保持该连接?
这如何比轮询更有效地使用电池?
谢谢
can somebody explain to me how googles Push Service work?
I know google has a persistent connection to its servers but how come that a persistent connection doesnt drain the battery for no good?
I understand polling on the otherside constantly wake up the system and boot up the radio. But how is this different from a constant connection to a googleserver?
For my understanding you need a permanent active radio to hold that connection?
How can this be more efficient in battery usage than polling?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想要一些流程图这里,您可以去。
更新,因为我看到了你的评论。
C2DM 本身的电池效率不高。如果你自己实现的话,它会做同样的事情。主要区别在于,您的设备默认已通过 Gmail Android Market 等服务与 C2DM 连接。通常是 googleApps。因此,C2DM 为您提供了使用“ASYNC”通知程序的机会,并为您的应用程序构建了间隔。
为了提高效率,你应该相信谷歌。但拥有 1 个轮询服务比添加另一个更好
If you want some flowcharts here you go.
UPDATE since i saw your comment.
C2DM is not battery efficient by it self. It does the same thing you whould do if implemented your own. The key difference is that your device is already connected by default with C2DM with services like Gmail Android Market .. generally googleApps. So C2DM is providing you the opportunity to use that "ASYNC" notifier with build in intervals for your application too.
For efficiency you should trust google to that. But having 1 polling service is better that adding another one too