how to set valid time period for android c2dm message?

扶醉桌前 提交于 2019-12-02 13:28:26
domi

Google just released a new version of c2dm called "Google Cloud Messaging (GCM)" at I/O 2012. With GCM its possible to define a timeout for your messages.

GCM ttl section: http://developer.android.com/guide/google/gcm/adv.html#ttl

You can find my answer to a similiar question here: https://stackoverflow.com/a/9709944/789738

C2DM itself doesn't have such a facility so you have two choices:

  1. Your server app only sends messages during certain times or
  2. Your Android app receives the C2DM messages all the time, but during certain times you ignore/handle as appropriate.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!