2

When I send a data only message from the app server while the app is killed or device turned off, the message is never received in the app after it is restarted. The send action (REST HTTP) is successful. When I only turn off the internet on the phone, then send a message from the server, now turn on the internet on phone, the message is received. But after app killed or device turned off, the message is never received after app runs again.

{
    "to" : "thekey",
    "data" : {
     "id" : "123"
    }
}

Or can I force a sync from the FCM server when my app starts?

I am using FCM 11.0.4.

Any help would be appreciated.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Ted
  • 21
  • 2

1 Answers1

0

This could be a device specific issue. Many OEMs lauchers force stop the application once killed. Example Oppo, xiaomi, etc The GCM/FCM server delivers the push payload to the device but the play services running on the device is not able to deliver the message to the application as the app is force stopped. So according the GCM/FCM server the notification is delivered to the app but in reality the notification payload is only delivered to the play services instance on the device.

Try on a stock android device like Nexus or Pixel you shouldn't face this issue.

FYI: Once the app is force stopped no receiver or alarm for the app will be active till the app is opened again by explicit user action

Umang
  • 966
  • 2
  • 7
  • 17