android - 将数据从Web服务推送到Android应用程序: C2DM

标签 android push-notification android-c2dm server-push

我有一个用例,我需要将一些信息从我的网络服务发送到 Android 应用程序。我刚刚了解了 C2DM,它用于此类用例(如果我错了,请纠正我)。

有人知道使用此服务时预计会有多少延迟吗?在我的用例中,我希望消息在 1-2 秒内从网络服务发送到手机。

有人使用过 C2DM 并了解平均消息延迟是多少吗?谢谢!

最佳答案

是的,您现在应该转向 GCM : -

GCM check it here

如果您打算开始使用任何消息传递或推送通知功能,那么避免 C2DM,因为将为 GCM(谷歌云消息传递)提供更多支持。它还具有更简单的 API 和更可靠的通知传递。

Reliability & Delay in messaging check here

只是一个想法:

Other option would be to poll data after certain interval of time and that time would obviously be more then 5 seconds or so { your choice }. With that you will make users a bit reluctant as data connection would be always needed and battery would be consumed more. So these things would be replenished by GCM services. But as far as message delivery is concerned its not for sure reliable.

关于android - 将数据从Web服务推送到Android应用程序: C2DM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13674158/

相关文章:

java - Exoplayer PlayerNotificationManager onSwipe

javascript - 创建phonegap项目的 list -有人可以添加更多元素

android - 无法更改 Android Studio 上 FloatingActionButton 布局文件中的图标颜色

java - 将数据推送到设备的最佳方式是什么?

android - 在设备上运行应用程序时出现 transformClassesWithJarMergingForDebug 错误

amazon-web-services - 如何从 WCF 休息服务向 Kindle Fire 发送推送通知

网络应用程序的 iPhone 推送通知?

android - 在 Android 中发送推送通知的最佳方式是什么?

android - 从广播接收器启动异步任务

android - 使用 App Engine Python 的 C2DM 返回 401 错误