how to set valid time period for android c2dm message?

后端 未结 2 1404
生来不讨喜
生来不讨喜 2021-01-29 11:36

I would like to implement a feature that only delivers messages to devices at specific periods. After the valid time, messages would be abandoned. Can anyone suggest me how to d

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-29 12:32

    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.

提交回复
热议问题