Push notifications you send from OneSignal must first go to the different push services (e.g., FCM, APNS, HMS). From the push services, the messages are delivered to each user’s device. In your OneSignal dashboard Push message reports:
  • Delivered means the push notification was successfully handed off to the push services. We get the response back from the push services.
  • Confirmed means the OneSignal SDK on the device received the notification. We get this status from each user’s device directly.
If your notification was “Delivered” but not “Confirmed” and didn’t appear on the device (or was delayed) this guide helps you troubleshoot why.

Prerequisites

To troubleshoot effectively, gather the following:
If you only have the External ID, search for the subscription in the Audience > Subscriptions tab using filters like Device Type, Last Session, and IP Address.

Device-level issues

Items controlled by the user on the device that can affect push notification delivery.

Push permission and subscription status

On the device, check the app’s Notification Settings. Verify that notifications permissions are enabled. Then open the app. It’s imperative that you open the app on the device for our SDK to update the subscription status and other properties. In your OneSignal dashboard Audience > Subscriptions:
  • Search for the Subscription ID
  • If you don’t have the Subscription ID, try to find it by searching the External ID and/or filtering by Device Type, Last Session, and IP Address.
You should see the push Subscription has a “Subscribed” push status.

Android categories disabled

If the device is an Android, check the 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 toggled off. If this category is used in a notification, the device will not receive the notification.

Image shows the category disabled for your app on the device, so when sending with that category, the device will not receive this push.

If no category is set, OneSignal uses a default “Miscellaneous” category. Make sure this category is enabled if you see it disabled. More details in Android Notification Categories.
Some Samsung devices automatically default to turning off categories for apps. See details in this reddit post and these articles by Android Police and article 2.
To try and educate your users about this, you can setup an in-app messages to target Samsung users and display instructions to enable categories. We provide a tutorial Example: Target certain Android manufacturers and devices.

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:
  1. Allow Background Activity:
    • Settings > Apps > Your App > Battery > Allow background activity.
  2. Disable Sleeping Apps Feature:
    • Settings > Battery and Device Care > Battery > Background Usage Limits > Sleeping Apps > Remove your app from this list.
  3. 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).
  4. Enable Auto-Start for the App (On Some Devices):
    • Settings > Apps > Your App > Permissions > Auto-Start > Enable.
  5. 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.

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.

Do not disturb & focus modes

If the device uses a “Do Not Disturb” or “Focus” mode, it may prevent display of notifications or group notifications together differently than other notifications for your app. If you swipe away the focus mode grouped notifications, they will not appear later in the already grouped notifications for your app in the device’s notification center. Check and disable these modes on the device.
  • iOS: Settings > Notifications > Focus Mode
  • Android: Settings > Notifications > Focus Mode
Then send yourself some test notifications to verify.

Notification grouping behavior

Along with Focus Modes, different versions of Android might have their own notification grouping behavior. Solutions to try:
  1. 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.
  2. Review device-specific settings: On the device, check Settings > Notifications > Advanced settings for any device-specific grouping options.
  3. Check for notification limits: Verify if battery optimization or app sleeping features are enabled for your app on this specific device.

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.

Emulator quirks

Your emulator device needs to both:
  1. Have the Google Play Services (Google Play Store) installed
  2. Start with a cold boot
  • Open Android Studio Device Manager
  • Select your device, make sure it has the Google Play Store installed and click Edit
  • Go to Additional Settings or More button
  • Set the Boot option to Cold Boot
  • Save changes and restart the emulator

Sending push

Common things to check when sending push notifications.

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.

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.

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 the 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.

Developers: Code blocking or removing notifications

OneSignal foreground notification prevention

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 in the background or 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.

iOS UNUserNotificationCenterDelegate blocking notifications in foreground

If you setup the iOS UNUserNotificationCenterDelegate then you may have code blocking the iOS device from showing the notification while in the foreground. Remove this custom code and use our SDK Foreground Event Listener method instead.

iOS badge clearing

Badge clearing can affect notifications. When an app clears badges it can remove existing notifications from the Notification Center. OneSignal’s SDK will also clear badges when the app opens which removes the notifications. See Badges for details on how to prevent this.

Removing notifications

Apple provides the removeAllDeliveredNotifications() method to remove all your app’s delivered notifications from the Notification Center. See Apple’s developer docs on removeAllDeliveredNotifications() .

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

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 support@onesignal.com 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

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. 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