I am currently developing an Android app which uses Firebase Messaging to receive notifications from the server.
It works fine on most of the devices but on some devices such as my Oneplus 3, when i restart the device and do not open my app after restart it starts missing notifications and when i open the app it only receives notifications sent after opening the app.
The following message shows in the logcat when i send notifications during the time when app is not opened after restart.
This is the message in the logcat:
W/GCM-DMM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.website.app (has extras) }
The same message is received in logcat when app is force closed.
I can request users not to force stop but how can i stop them from rebooting their device. Therefore I request a help from stackoverflow community in this context. Is there any way i can know that app has missed some messages while it was closed?