I had a similar use-case once and this was the exact issue we face, but sorry to say this happens sometimes. I am quoting this from the official docs
FCM usually delivers messages immediately after they are sent. However, this might not always be possible. For example, if the platform is Android, the device could be turned off, offline, or otherwise unavailable. Or FCM might intentionally delay messages to prevent an app from consuming excessive resources and negatively affecting battery life.
When this happens, FCM stores the message and delivers it as soon as it's feasible. While this is fine in most cases, there are some apps for which a late message might as well never be delivered. For example, if the message is an incoming call or video chat notification, it is meaningful only for a short period of time before the call is terminated. Or if the message is an invitation to an event, it is useless if received after the event has ended.
On Android and Web/JavaScript, you can specify the maximum lifespan of a message. The value must be a duration from 0 to 2,419,200 seconds (28 days), and it corresponds to the maximum period of time for which FCM stores and attempts to deliver the message. Requests that don't contain this field default to the maximum period of four weeks.
So I would suggest you are better off if possible to implement some other means for this like Socket
connection or something. As far as I know there is no way of knowing if the Notification
reach the user's device that is iOS
or Android
. We do get an OK or Success response when send the message, but whether they reach or not is a different thing.
You should check that link and reduce the TTL
factor, that might or might not help.