Skip to content

Instantly share code, notes, and snippets.

@walioul
Last active April 18, 2018 19:18
Show Gist options
  • Save walioul/be186e013c6b95b6ff68362bc16dc249 to your computer and use it in GitHub Desktop.
Save walioul/be186e013c6b95b6ff68362bc16dc249 to your computer and use it in GitHub Desktop.

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.

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