简体   繁体   中英

Android C2DM message received confirmation at App Engine side

Is there a way I can get the information whether the c2dm message was sent to a device or still in queue somewhere on App Engine side? The device won't get the messages if it's on some WiFi access point (random behavior).

I want to implement time limit to the notification messages. If the time is up, the messages make no sense anymore and should never be delivered.

You shouldn't be sending information, however small, directly to your users through C2DM. C2DM is designed to be used as a way to alert your device that there is new information on the server. Your client should then connect with the server to download the relevant information. If you follow this design pattern, then between your client-side and server-side code, I'm sure you can easily figure out if a message is stale or not.

Please note that Glendon has the best solution. Another way would be to include the time sent with the message. Then calculate how far in the past that message was sent when received on the phone, taking no action if it is too old.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM