我有一个用例,我需要将一些信息从我的网络服务发送到 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/