문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top