What is Firebase Cloud Messaging?
Firebase Cloud Messaging (FCM) is Google's service for sending messages to apps. When a chat or mail app has something new for you, its server doesn't contact your phone directly. It sends the message to FCM, and FCM passes it on. Google's FCM architecture page describes the path in four steps:
- The app's server builds the message and sends it to FCM.
- FCM's backend accepts it, gives it an ID and hands it to the transport layer for your kind of device.
- On Android, that transport layer runs only on approved devices with Google Play services, which receives the message on your phone.
- The FCM code inside the app shows the notification or handles the data.
Why does one connection serve every app?
Google Play services keeps a single, always-open connection to Google, and every app that needs real-time messages shares it. Android's Doze and App Standby guide explains why: one shared connection saves a lot of battery compared with every app keeping its own, so Google strongly recommends that apps use FCM.
When a message arrives, the app gets a short window to handle it. Firebase says several seconds are given to process each message, which is meant to be just long enough to show the notification.
The flip side: most apps' notifications pass through Google Play services first. If it can't run, messages for all of those apps wait together. That's why the fix guide for Google Play services and late notifications starts there.
Normal vs high priority: what does Doze change?
When a phone is unplugged, still and has had its screen off for a while, Android enters Doze. It cuts apps' network access and puts off their jobs, syncs and alarms, waking briefly in maintenance windows that come less often the longer the phone sits idle. Picking up the phone, turning on the screen or plugging it in ends Doze (Android docs).
Android also has App Standby for apps you haven't used in a while: it puts off their background network use, and if the phone stays idle for a long time, it lets idle apps go online about once a day.
Every FCM message has a priority, and Firebase explains how each one behaves:
- Normal priority is the default. It arrives right away while the phone is awake, but in Doze it may wait until the phone leaves Doze. Firebase suggests it for things like new-email notices and syncing app data.
- High priority is delivered immediately when possible: FCM can wake a sleeping phone and let the app do a little work, including very limited network access. Firebase recommends it for chat messages and other things you should see right away.
- Priority can be lowered. If an app's high-priority messages often don't end in a visible notification, FCM may treat them as normal priority. It judges each install by the last 7 days of messages.
Google's newer API calls the urgent kind RemoteNotification and the background kind BackgroundSync, and Firebase says RemoteNotification messages are delivered without any intended delay, bypassing Doze. Either way, the app's server picks the type when it sends the message. Nothing on your phone can change it.
What happens to a message that can't be delivered yet?
FCM doesn't give up the moment your phone is unreachable. From Firebase's documentation:
- It waits. If the phone isn't connected to FCM, the message is stored until a connection is established, and then all waiting messages are delivered.
- For up to four weeks by default. The sender can set a lifespan from 0 to 28 days. A lifespan of 0 means "now or never": if the message can't be delivered immediately, it's thrown away.
- Up to 100 waiting messages per app. For a disconnected phone, FCM stores at most 100 pending messages per app install (counting messages that can't be merged into one). Beyond that, it tells the app that messages were deleted instead of delivering them.
- A force-stopped app gets nothing. Firebase's delivery reports count messages dropped because the app was force stopped when delivery was tried. Android keeps a force-stopped app stopped until you open it again: broadcasts skip stopped apps by default (Android 3.1), and from Android 15, force-stopping also cancels the app's pending intents, such as its widget updates.
The app's developer chooses a message's priority and lifespan. What you control is whether your phone can receive it: that it's online, that Google Play services can run, and that the app isn't stopped or frozen.
What does HyperOS add on top?
Everything above is standard Android. HyperOS adds its own freezer: to save battery it freezes apps you aren't using, and a frozen app can't run at all. This is separate from Doze. A public investigation of HyperOS's freezer on China ROM phones found that being on Android's Doze allowlist doesn't stop Xiaomi from freezing an app.
The same investigation traced long push outages to Xiaomi freezing Google Play services. Its FCM connection appeared briefly after the phone woke, then disappeared while Google Play services was frozen, and on one test phone it only came back when the phone was unlocked. To FCM, the phone then looks disconnected, so messages for every app wait on Google's servers as described above.
Apps get frozen too. In HyperKeep's own tests on a China ROM phone, HyperOS's logs showed it refusing to hand a push message to an app while that app was frozen.
Xiaomi does keep a list of apps that are never frozen, and the investigation found that adding Google Play services to it stopped the screen-off freezes on its test phone and kept the FCM connection up. The catch: Xiaomi rebuilds that list from its own choices whenever an app's battery setting changes (on our test phone, also about 10 seconds after an app was installed or removed) and drops everything else.
China ROM phones are hit hardest. Google Play services is an add-on there (Settings → Additional settings → Accounts → Basic Google Services), and on the China ROM builds we tested its battery page has no options, so you can't give it No restrictions or keep it on the list from Settings. See notifications on China ROM phones.
What does this mean for fixing late notifications?
- Message priority can't help while Google Play services is frozen. High priority lets FCM wake a sleeping phone, but the message still needs Google Play services' connection, and the sender chooses the priority anyway.
- A Doze exemption isn't enough. Android's battery optimization allowlist doesn't stop Xiaomi's freezer, as the investigation above found.
- Keeping apps unfrozen is what matters. That means keeping Google Play services, and the apps you rely on, on Xiaomi's no-freeze list, and putting them back whenever Xiaomi rebuilds it. Every fix compared walks through the ways to do that, from settings to ADB, Shizuku and root.
- Reconnecting helps waiting messages arrive. After putting Google Play services back on the list, HyperKeep asks it to check its connection to Google straight away. On our test phone, Google Play services ran that check about a second later instead of waiting for its next scheduled one.
- Night-time limits remain. Being on the list stops the routine freezing, but HyperOS has other limits, such as its deeper night-time sleep, that no app can change. See late notifications at night.
HyperKeep is a free app for China ROM phones on HyperOS 1, 2, 3 and 4. It keeps Google Play services and the apps you choose on Xiaomi's list and puts them back in about 2 seconds when Xiaomi drops them. For the step-by-step fix, see Google Play services and late notifications.