Skip to content

Instantly share code, notes, and snippets.

@gdeglin
Last active May 26, 2023 11:55
  • Star 12 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Reasons an FCM notification can be delayed

Reason 1: Force Stopped

When an app is in a "Force Stopped" state most events including FCM/GCM messages for push notifications will not be received.

An app can be placed in this state in the following ways.

  • From Settings > Apps, "Force Stop" is pressed.
  • Long pressing the back button on some devices.
  • Using a 3rd party task killer like Greenify.
  • App is closed on a Huawei or Xiaomi device due their custom Android tweaks.
    • Huawei - Go to Settings > "Protected apps", check your app.
    • Xiaomi - Make sure "Auto-start" property enabled for your app in the settings.

Reason 2: Bad WiFi Router or Carrier

FCM/GCM Notifications require a device to maintain an open connection to Google's servers. Some home and commerical wifi routers interfere with this connection. Some mobile carriers may interfere with this too, but this is rare.

If a router terminates this connection, the device may wait 15 minutes before reconnecting and receiving pending notifications.

Reason 3: Low power mode

Some Android devices may enter a battery saving mode that can delay notifications. This is true for Android 6.0 devices and for other devices made by manufacturers that have modified the Android OS.

This battery saving mode will disconnect the device from FCM/GCM and may delay notifications until the device reconnects every 15 minutes or so.

@MustafaHossaini
Copy link

fuck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment