You may encounter issues with notification delivery caused by Android modifications made by device manufacturers. In most cases these are power-saving settings applied by default: apps are killed when not in use and are not started in the background when a notification arrives. Note that if an app is force stopped from Settings, Android blocks its background delivery entirely until the user launches the app again — this is standard Android behaviour and cannot be worked around by any SDK.
First, check the platform-level settings (all vendors)
- Android 13 and later: the app must be granted the runtime
POST_NOTIFICATIONSpermission. If the user declined it, no notification is displayed at all. Check Settings → Apps → your app → Notifications. - Android 12 and later: make sure the app is not in the Restricted battery state and that app hibernation ("Pause app activity if unused" / "Remove permissions if app is unused") is turned off for the app.
- Set battery usage for the app to Unrestricted in Settings → Apps → your app → Battery.
Huawei
- Settings → Battery: disable "Power Saving mode" and "Ultra Power Saving mode".
- Settings → Battery → App launch: turn "Manage automatically" Off for the app and enable all three manual options — "Auto-launch", "Secondary launch" and "Run in background".
- Older EMUI versions: Settings → Battery → set "Close apps after screen lock" to "Don't close"; Settings → Apps → the app → Data usage → allow "Background data".
Xiaomi (MIUI / HyperOS)
- Settings → Apps → Permissions → Autostart: enable it for the app.
- Settings → Battery & performance → choose the app → select "No restrictions".
- In Recents, lock the app so it is not cleared.
Oppo / Realme / OnePlus (ColorOS / OxygenOS)
- Settings → Battery → Battery optimization → choose the app → "Do not optimize".
- Settings → Battery → disable "Freeze when in Background" and "Automatically optimize when an anomaly is detected" for the app.
- Enable Autostart for the app in the phone manager / Startup Manager.
Asus
- Settings → Apps & Notifications: enable notifications for the app.
- Auto-Start Manager: enable it for the app.
- Settings → Apps & Notifications → Special app access: allow the app.
Samsung (One UI)
- Settings → Battery → Background usage limits: make sure the app is not listed under "Sleeping apps" or "Deep sleeping apps", and add it to "Never sleeping apps".
- Settings → Battery: turn off "Power saving" or exclude the app from it.
Sony
- On older Xperia models, STAMINA mode blocks background apps in standby: Settings → Battery → STAMINA mode → add the app to the apps allowed to stay active. On current models, use Settings → Apps → the app → Battery → Unrestricted.
Menu names vary between device models and firmware versions; if an item is not where described, search the device Settings for "battery optimization", "autostart" or "background".
Comments
0 comments
Please sign in to leave a comment.