DEV Community

Cover image for Android Notifications Delayed or Missing: Battery Optimization Fixes
epifive
epifive

Posted on Originally published at epifive.com

Android Notifications Delayed or Missing: Battery Optimization Fixes

If Android notifications arrive late or not at all, the cause is usually one of three things: the app's notification permission or a Do Not Disturb mode is blocking it, Android's battery management is limiting the app's background activity, or your phone maker's extra power-saving layer is putting the app to sleep. Work through them in that order. For apps you cannot afford to miss, such as WhatsApp, Gmail or a calendar, setting battery use to unrestricted fixes most delays.

Who this is for and what you will have at the end

This guide is for anyone whose Android phone shows alerts only after you unlock it, or never shows some of them. It applies to Google Pixel phones and to Samsung Galaxy phones, with notes for other makers. At the end you will have verified that notifications are allowed, that no mode is silencing them, that the apps you care about are exempt from aggressive battery limits, and that you know how to test the result.

Menu names differ between phone makers and Android versions. The paths below come from Google's Pixel help pages and, for Samsung, from the DontKillMyApp guide, which itself notes that layouts change often. If a label is missing on your phone, use the search box at the top of Settings and look for "battery" or "sleeping".

Why Android delays notifications

Understanding the mechanism helps you pick the right fix. Android's developer documentation describes two battery-saving features that matter here.

  • Doze. When the device is idle on battery, Doze suspends network access, ignores wake locks and defers standard alarms until a maintenance window. Background jobs scheduled through the system scheduler also do not run.
  • App Standby. Apps you have not used recently have their background network activity deferred.

Google's guidance for app developers is that time-sensitive, user-visible notifications should be sent as Firebase Cloud Messaging messages of the "RemoteNotification" type, which can wake the app even in Doze or App Standby. Non-urgent messages are marked as background sync and, in Google's words, may be delayed or throttled to protect battery.

On top of this, Android sorts apps into standby buckets: Active, Working set, Frequent, Rare and Restricted. The buckets limit how often an app's jobs and alarms can run. The Restricted bucket is the harshest. According to Google's documentation, jobs there run once a day in a 10-minute batch, and the app gets one alarm per day. Android 13 and later can move an app there if you do not interact with it for 8 days, and apps you have designated as unrestricted in system settings are exempt from that move.

Two practical consequences follow:

  • An app you open every day is usually fine. An app you rarely open but expect alerts from, such as a bank, a delivery service or a rarely used chat app, is the likeliest to be throttled.
  • An app is promoted to the Active bucket when you tap one of its notifications. Swiping a notification away does not count.

Beyond stock Android, many manufacturers add their own limits. DontKillMyApp, a site that tracks this behavior, ranks Samsung, Xiaomi, OnePlus and Huawei among the most aggressive at stopping background apps, and rates Google's own Android and Nokia at the lowest level. That is why the same app can behave well on a Pixel and badly on another brand.

Step 1: Rule out the simple causes

Do these first because they take two minutes and fix more cases than people expect.

Check the app's notification permission

  1. Open Settings and go to Notifications or Apps, then pick the app.
  2. Open its notification settings and confirm notifications are on.
  3. Check each notification category. Many apps, WhatsApp and Gmail included, split alerts into channels such as messages, groups and promotions. A channel set to silent or minimized will not pop up on screen.

On recent Android versions, an app asks for notification permission the first time it runs. If you tapped "Don't allow" once, the app stays blocked until you turn it on here.

Check Do Not Disturb and other modes

On a Pixel, Google's help page describes the controls this way:

  1. Open Settings, tap Modes, then tap Do Not Disturb. If it shows as on, alerts from apps you have not allowed are filtered.
  2. To allow exceptions, open Settings, tap Modes and select the mode you want to change.
  3. Under Notification filters, choose what to block or allow:
    • People to allow or block calls, messages or conversations. You can also turn on Allow repeat callers, which lets a call through if the same person calls twice within 15 minutes.
    • Apps to choose which apps can send you notifications.
    • Alarms & other interruptions for alarms, media, touch sounds, reminders and calendar events.

If a mode has a schedule, it can switch on by itself at night or during a calendar event and stay on longer than you expect. Open the mode and look at its schedule. Google also notes that critical notifications, such as system security alerts, still appear regardless of these settings.

On other phones the same feature may be called Do Not Disturb under Sound or Notifications, with an Apps or "Exceptions" list. Make sure the apps you care about are in it.

Look at connectivity

A notification cannot arrive without a connection. If you use a battery saver that also limits mobile data, or a VPN that drops when the screen is off, alerts will queue until the phone reconnects. Turn off Battery Saver temporarily and see whether the delay disappears. If it does, the next section is where you need to work.

Step 2: Set the app to unrestricted battery use

Android lets you choose how each app is treated in the background. The names are usually Unrestricted, Optimized and Restricted. Optimized is the default for most apps. Restricted limits background activity and can delay notifications. Unrestricted lets the app run in the background without limits, which can cost more battery.

On most Android phones the path is:

  1. Open Settings, then Apps.
  2. Select the app, for example WhatsApp or Gmail.
  3. Tap App battery usage or Battery.
  4. Choose Unrestricted.

On some Pixel builds the screen shows a single switch labeled Allow background usage above the three options, and turning it off is roughly the same as Restricted. Make sure it is on, then select the option you want. Some users report this setting reverting to Optimized after a few hours, but Google has not documented that behavior, so verify it again the next day.

Android also keeps the older list of exemptions. Google's documentation describes it as Settings > Battery > Battery Optimization, where the list of apps can be switched to all apps and an individual app can be set to not be optimized. If your phone has this list, check there too, since it is the setting that exempts the app from Doze and App Standby restrictions.

Apply this to a handful of apps only. Exempting everything defeats the purpose of battery management and drains the phone.

What not to expect

Google Play policy restricts which apps may ask for the exemption. Instant messaging and chat apps that can use Firebase Cloud Messaging are not supposed to need it. In practice that means well-built messaging apps should deliver alerts without your help, and the problem lies in the phone's restrictions. Setting unrestricted is still a legitimate user choice, because you are deciding for yourself, not the app asking.

Step 3: Samsung Galaxy fixes

Samsung adds its own sleeping layer. The DontKillMyApp Samsung page gives these steps, and notes that labels vary by model and One UI version.

Wake the app and stop automatic sleeping

  1. Open Settings, then Battery (on some phones Device care, then Battery).
  2. Look for Background usage limits. Check the lists inside it, including the sleeping apps, deep sleeping apps and never sleeping apps lists.
  3. Remove your app from the sleeping and deep sleeping lists, and add it to the Never sleeping apps list.
  4. Turn off Put unused apps to sleep and Auto-disable unused apps. DontKillMyApp warns that otherwise an app may be put back to sleep after about three days even if you woke it manually.

On older versions of the same layout, the path is Device care > Battery > App power management, with the same toggle and lists.

Use Don't optimize

DontKillMyApp lists this path for Android 11 on Samsung: Settings > Apps > Your app > Battery > Battery optimization, switch the list to All apps, find the app and choose Don't optimize. The same site also lists turning off Adaptive battery under Battery > More battery settings as a step for Android 11. Adaptive battery learns which apps you use and restricts the rest. Turning it off affects every app, so try the per-app steps first and leave it for last.

Step 4: Other brands

The pattern is similar elsewhere, but the names differ. Xiaomi, OnePlus, Huawei and others usually add an autostart or "background activity" switch in addition to the Android battery setting. The DontKillMyApp site has a page per manufacturer with current paths. Check the page for your brand rather than guessing, and treat any path as a starting point that may have moved in a recent update.

A short checklist that works on most of them:

  • Allow the app to run in the background or start automatically.
  • Remove it from any list of apps that are put to sleep or optimized.
  • Lock the app in the recent apps screen if your phone offers that option, so cleaning tools do not close it.
  • Do not swipe the app away from the recents screen repeatedly to "close" it. On some brands, a swipe-away stops the app until you open it again.

Verify the fix

Do not rely on waiting for a real message. Test it on purpose.

  1. Send yourself a message from another device or ask a friend to send one.
  2. Lock the phone and leave it untouched on a table for at least 30 minutes, long enough for Doze to start. Use a phone that is not charging, since Doze applies on battery.
  3. Send the message and watch when the alert appears.
  4. Repeat the next morning, after a night idle.

Developers can force these states with Android Debug Bridge, and you can use the same commands to test. This works from a computer with USB debugging enabled:

adb shell dumpsys deviceidle force-idle
adb shell dumpsys deviceidle unforce
adb shell dumpsys battery reset
Enter fullscreen mode Exit fullscreen mode

The first command makes the device behave as if it has entered Doze, the second leaves it, and the third resets the battery state if you changed it. To see which standby bucket an app is in:

adb shell am get-standby-bucket com.whatsapp
Enter fullscreen mode Exit fullscreen mode

Google's documentation says the system throttles an app whenever its bucket value is higher than the Active value of 10, so a result well above 10 on an app you rely on suggests it is being limited. Replace the package name with the one for your app.

Troubleshooting

Symptom Likely cause What to try
No alert from one app only App permission or notification channel off Recheck the app's notification settings and each category
Alerts only when you pick up the phone Doze or restricted battery use Set the app to Unrestricted
Alerts stop after a few days Sleeping app feature (Samsung) Turn off Put unused apps to sleep and add the app to Never sleeping apps
Alerts stop after an update Settings reset by the update Recheck battery and sleeping lists
No alerts at night A scheduled mode Open the mode and review its schedule
Alerts delayed on Wi-Fi only Network or VPN dropping when idle Test on mobile data, and check the router and VPN settings
Calls do not ring in Do Not Disturb Exceptions not set Add People or repeat callers under the mode

If one specific app is still late after all of this, the cause may be the app, not the phone. Check that it is up to date, that you are signed in, and that its own in-app notification settings are on. As a last resort, sign out and back in so the app registers with the notification service again, or reinstall it, making sure you have a backup first. Our guide to Android backup and restore explains how.

Keep battery life reasonable

Unrestricted settings cost battery, so be selective.

  • Keep the exemption to messaging, email, calendar and safety apps.
  • Leave games, shopping and social apps on Optimized.
  • If battery life suffers after your changes, check which app uses the most in the battery screen and revisit it. The article on checking and improving Android battery health covers that.

Summary checklist

  1. Confirm notifications are enabled for the app and every category.
  2. Check Do Not Disturb or any mode, and its schedule, and add exceptions.
  3. Set the app to Unrestricted in app battery usage.
  4. On Samsung, remove it from sleeping lists, add it to Never sleeping apps and turn off automatic sleep options.
  5. On other brands, enable autostart or background activity from the maker's settings.
  6. Test with a locked, idle phone and recheck after each system update.

References


This guide was researched and drafted with AI assistance and checked against the vendor documentation listed in its References. Read the maintained version and related guides on EpiFive.

Top comments (0)