Skip to content Skip to sidebar Skip to footer

Is It Possible For Android To Retrieve Fcm Notification If The Notification Was Sent When It Was Offline

I'm using firebase cloud messaging, and I'd like to know if it's possible to send a notification to an offline device and receive it after it comes online afterward. Client side I

Solution 1:

That should be the correct behavior. When the device is offline or in doze it will deliver it as soon as it feels like it needs to or when the device wakes up. https://firebase.google.com/docs/cloud-messaging/concept-options#lifetime

You could try playing around with priorities to see if that delivers notifications faster once the device is turned on, if you need it to be as soon as possible.

Solution 2:

You are going good.

But As off now Google do not provide any history feature on user basis.

I can suggest a simple approach to this problem. You can keep a record of the notifications you send to users at server end. At users end, whenever notification is received maintain another record.

And whenever user goes online just tally both the records and fetch missing records using restful service. You can use various parameters for tallying the records like timestamp, tokens, etc.

Hope this helps.

Post a Comment for "Is It Possible For Android To Retrieve Fcm Notification If The Notification Was Sent When It Was Offline"