Mobile push: Notifications not shown or delayed
Common reasons why Mobile Push notifications are not showing on your device.
When push notifications sent from OneSignal have a "Delivered" status, it means we have successfully sent the notification to the push services (FCM/APNS/HMS etc.). These push services then distribute the notifications to your users. The "Confirmed" stat means our SDK received the notification which should have been shown on the device.
The following are common reasons for push notifications not showing or getting delayed. This guide provides troubleshooting steps to diagnose and resolve the issue.
Find your mobile subscription (device) within your OneSignal dashboard
See Test subscriptions for details on how to find your device and set it as a test subscription.
This will help make sure you are setup correctly and make troubleshooting much easier.
Notification permission
On your device, check your app's notification settings. Verify that notifications are enabled for your app then open your app. In your OneSignal dashboard Audience > Subscriptions, you should see your push Subscription has a "Subscribed" push status.
Device not in message audience
Your subscription may not be included in the targeted audience of the message. If using Segments or filters make sure your subscription fits the criteria. If targeting External ID, or other aliases, check that it is set and you are sending to the right one.
Network connection
Devices must be online to receive push notifications. If your device is turned off, in airplane mode, has unstable or no internet connection, the push will not show until a proper connection is made. See Time To Live (TTL) Parameter for details.
Wifi-connection, Firewall or VPN
Check the network / WiFi you're connected as it may have closed your connection to Apple or Google servers'. Try disabling and re-enabling your internet connection. Also try without wifi using cellular data.
If you are restricting traffic to or from the Internet, you need to configure it to allow connectivity with the push services.
- FCM requires open ports to: 5228, 5229, and 5230. More details: https://firebase.google.com/docs/cloud-messaging/concept-options
- APNS must connect to: TCP port 5223 & TCP port 443 or 2197. More details: https://support.apple.com/en-us/HT203609
Do not disturb & focus modes
Check and disable "Do not disturb" and "Focus" modes on the device. These will prevent notifications from displaying. You may be able to put the app on an "allow" list if desired.
Low power mode & battery optimization
iOS devices: Disable low power mode while testing or charge the device.
Android devices: There are several different names for "Battery Optimization" settings depending on the device manufacturer and operating system version. In the Battery Settings, set the app to "Unrestricted" or "Not Optimized". If you don't have this setting, search for Battery Optimization or Power Saving Mode or Energy Saving or Background usage limits or Adaptive Battery Settings and disable for the app or while testing.
Collapse ID
If you are adding a Collapse ID to your messages, the newest notification will replace the older notifications with the same ID. Check that you are not setting this or setting it correctly for notifications you want replaced. See Remove notifications & TTL for details.
App blocking notifications
Our SDK has a Foreground Event Listener method. Within this method you can call event. preventDefault()
which will block the notification from showing while the app is open.
While testing, make sure the app is closed to verify this is not blocking notifications.
Android Service Extension blocking notifications
If you setup the Android Notification Service Extension this is the entry point for your notification to the app. You may be blocking notifications with the event.preventDefault()
method. Check your code to see if this is being used and under what conditions.
Firebase conflicts
If you are using Firebase Messaging SDK, check your Android Manifest file for the following line. This may be blocking your notifications.
com.google.firebase.iid.FirebaseInstanceIdReceiver
Android specific issues
Each Android manufacturer creates their own flavor of Android for their devices. Sometimes this can cause different experiences with push notifications across different devices.
Android categories disabled
In your Android Settings App > Notifications > Your App you should see "Show notifications" enable and all categories underneath enabled. If you have a category disabled, you will not get notifications from that category.
In this example, the "Abandoned Cart - Urgent" Category is turned off. If I set this category in the notification, the device will not get this notification.
If no category is set, OneSignal uses a default "Miscellaneous" category. Make sure that is enabled if not setting categories. See Android Notification Categories for more details.

Image shows the category disabled for your app on the device, so when sending with that category, the device will not receive this push.
Notification grouping behavior
Different versions of Android might have their own notification grouping behavior that can sometimes differ from stock Android. This can relate to both 1) adding a group key and 2) adding Android notification categories.
Solutions to try:
- Try creating Android notification categories either in your OneSignal dashboard or using code. Then set this ID on all your notifications to see if that has any effect.
- Try using Notification grouping by adding a group key when sending via OneSignal or internally in your Service Extension. If you create your own group, add it to all all notifications (
setGroup("your_group_key")
) and create a summary notification (setGroupSummary(true)
). Ensure all notifications in the group have the same priority/importance - Review device-specific settings: On the device, check Settings > Notifications > Advanced settings for any device-specific grouping options.
- Check for notification limits: Verify if battery optimization or app sleeping features are enabled for your app on this specific device.
Android app is Force Stopped
When an Android app is Force Stopped, the device will prevent push notifications for that app from displaying. To help save battery life, some Android manufacturers like Xiaomi, Huawei, Samsung and others have implemented aggressive background process management which may Force Stop your app when the user swipes it away (while omitting larger apps like Facebook, Whatsapp, Gmail, etc). There is a lot of information about this online like: https://dontkillmyapp.com/ and we wrote a blog post about it which generated a lot of discussion on Reddit.
Depending on the device, you may need to take the following steps to prevent this from happening:
- Allow Background Activity:
- Settings > Apps > [Your App] > Battery > Allow background activity.
- Disable Sleeping Apps Feature:
- Settings > Battery and Device Care > Battery > Background Usage Limits > Sleeping Apps > Remove your app from this list.
- Lock the App in Recent Apps:
- Open your app, then tap the Recent Apps button.
- Find your app, tap and hold on the app window, then Lock this app (available on some Samsung models).
- Enable Auto-Start for the App (On Some Devices):
- Settings > Apps > [Your App] > Permissions > Auto-Start > Enable.
- Disable Adaptive Battery Optimization for the App:
- Settings > Battery and Device Care > Battery > More Battery Settings > Adaptive Battery > Toggle Off (or exclude your app).
While testing, make sure your app is running while sending notification. See Getting a Debug Log to verify you are receiving the message.
Android Doze mode, priority & deprioritized (throttled) messages
Android’s power-saving features (Doze mode and App Standby) can delay or block notifications. These modes go into effect automatically when the device is unplugged and stationary for a period of time.
If your device is in these modes, sending high priority messages will wake the app. However, sending too many may cause your notifications to get deprioritized and sent with normal priority. FCM states:
High priority messages on Android are meant for time sensitive, user visible content, and should result in user-facing notifications. If FCM detects a pattern in which messages do not result in user-facing notifications, your messages may be deprioritized to normal priority or delegated for handling by Google Play Services.
Testing
Follow Getting a Debug Log to add our verbose debugging methods to the app.
Have the app running in the background and send yourself a message.
If you are not getting the message event, contact [email protected] with the following information:
- The full log from the test. See Getting a Debug Log for details.
- The link to the message report in your onesignal.com dashboard that you sent when debugging. This can be found in Delivery > Sent Messages. Just click the message you sent, then copy-paste the URL and share that with us.
Checking your app state
1. Run the following to check the current state of your app.
Replace "com.company.appname" with your package name.
adb shell dumpsys package com.company.appname | grep stopped
If you see stopped=false
if everything is fine, otherwise you will see stopped=true
then your app was force killed in some way.
2. Another way is to send a few notifications and check for the following GCM logcat entry.
W/GCM-DMM: broadcast intent callback: result=CANCELLED forIntent {
act=com.google.android.c2dm.intent.RECEIVE pkg=com.onesignal.example (has extras)
}
If you seen this cancelled intent above then your app could not be started to process the notification.
Some device manufactures will white list apps from going into the force closed state. Example such as Gmail and Whatsapp.
Additional Debugging
FCM provides a REST API to query the last time a device has been connected to FCM. See the following Google documentation on how to get this.
https://developers.google.com/instance-id/reference/server#get_information_about_app_instances
Updated 17 days ago