Pregunta

I'm currently working on an Android messaging app and GCM is utilized for notifications.

When the device of the recipient, that'd already be registered on GCM, is off, what exactly happens? Does GCM wait until the device is back online? If so, does the device send a message to say it's alive, or does GCM keep pinging the device? Or does GCM continually send the message until success? Either way, how long can the message persist on the GCM server when the device is offline?

Any direction would be helpful.

¿Fue útil?

Solución

As per the documentation

Google enqueues and stores the message in case the device is offline.

When the device is online, Google sends the message to the device.

Detailed Explanation

If the device is not connected to GCM, the message will be stored until a connection is established.

how long can the message persist on the GCM server when the device is offline

If the device never gets connected again the message will eventually time out and be discarded from GCM storage. The default timeout is 4 weeks, unless the time_to_live flag is set.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top