OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Discussions

Notifications Not Shown

Common reasons why push notifications are not showing on your device.

When a notification shows as "Delivered" in OneSignal, it means we have successfully sent the notification to Google or Apple's servers which then distribute the notifications to your subscribers.

The following are reasons why notifications may show as "Delivered" on the OneSignal dashboard or API, but are not visible on your device or website.

Common Issues for All Platforms

Network issues

Devices must be online to receive push notifications. If your device has unstable or no internet connection, the push will not show until a proper connection is made. You can set the timeframe Google and Apple Servers will wait for a connection with the TTL Parameter (the default is 3 days).

Also 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. See our Notifications delayed troubleshooting guide for more details details.

Not Subscribed

Make sure your device is still subscribed to push notifications. You can find your player id with this guide to make sure your device is still subscribed.

Not Targeted In the Push

  1. Check the segment you sent the push to and make sure it is setup correctly. This is under Segments. Sometimes an incorrect filter is added to the segment removing certain devices.

  2. Check the Player ID record in the All Users section of the dashboard. Under the "Segments" column, you will see if that user is in the segment targeted for push.

NEXT - Jump to platform:

If these cases are not the issue, please see below platform specific issue guides:


Mobile Specific

If your device is subscribed and has a working network connection, try adding your device as a Test User. Make sure you are using the latest version of the OneSignal SDK and have the app running in the background when you test the push.

Then follow these points if you still do not get the notification:

Xcode 11 change

iOS

If you are using Xcode 11, make sure you are using the latest version of the OneSignal SDK (minimum version 2.10.1). You can open your All Users page and check the SDK VERSION column to see what version you are on. Xcode 11 made a breaking change that affects push token registration. More details here: https://onesignal.com/blog/ios-13-introduces-4-breaking-changes-to-notifications/

The app has push permissions Disabled

iOS, Android

In your Device Settings, you can turn on and off push notifications. Make sure push permissions are enabled for your device:

  • iOS - Check your app under Settings > Notifications > Your App > Allow Notifications should be turned on.
  • Android - Check the notification setting under Settings > Apps

Each OneSignal SDK has a setSubscription method. If this is set to false then the device will show as subscribed in the app settings, but is actually unsubscribed from OneSignal in All Users. Make sure you did not add this property to your app.

The app is currently In Focus

iOS, Android

Please check the value you added in you init for inFocusDisplaying or inFocusDisplayType depending on your Mobile SDK Version.

If you set this to None or 0 then no notification will show while the app is open. There are other options you can set this to if you want to show notifications while the app is open.

Low Power, Energy Saving, Do Not Disturb Mode

iOS, Android

Some devices have a specific battery optimization that will stop notifications from showing.

  • iOS - "Low Power Mode" is enabled. If in your Settings > Battery > Low Power Mode is enabled, this will reduce the rate at which notifications can be received or turn them off completely.
  • iOS - "Do Not Disturb" is enabled. If in your Settings > Do Not Disturb is enabled, this prevents the notifications from "popping up" on the screen but still show in the "Notification Center" of the device when you swipe down.
  • Android - "Energy Saving" or "Battery Optimization mode". On the device, check Settings > Battery > Battery Optimization or Adaptive Battery > Find your app and press Don't optimize

The App is Force Stopped

Android

When an app is in a "Force Stopped" state most events including FCM messages for push notifications will not be received. An app can be placed in this state in the following ways.

  • From Settings > Apps, "Force Stop" is pressed.
  • Long pressing the back button on some devices.
  • Using a 3rd party task killer like Greenify.
  • Swiping away your app while remote debugging it. (Not the same as viewing the logcat but launching your app as a remote debug process.)
  • Swiping away your app from the recent apps on list (common on Xiaomi devices).
  • Automatically on some devices due to custom Android tweaks done by manufactures. This is a known issue affecting all push providers (not just OneSignal). We have written a blog post about this and this issue can be found on many 3rd party sites like this one: https://dontkillmyapp.com/

Based on your device manufacturer, you can follow these steps to enable push for your device. For your app users, if you want to help educate them on this issue, you can send an In-App Message asking them to enable push settings for your app. Details on how to set this up in our In-App Messaging Examples.

Manufacturer
Description

Asus

Check your app in the Auto-start Manager.



Huawei

Step 1: Settings --> Advanced Settings or Power Saving --> Battery Manager or Protected Apps --> select the app to protect it.

Step 2: Settings --> Apps or Notification Manager --> Advanced or Notify for your app --> Ignore Battery Optimizations, select the app and ignore it.

Step 3: Settings --> Notification Panel & Status Bar --> Notification Center, select the app, then activate "Allow Notifications" and also "Priority Display".

Full Instructions

Pre-EMUI 5.0 / Android 7 - Go to Settings > "Protected apps", check your app. Full Instructions



LeEco/LeTV

Step 1: Settings --> Permissions --> Manage Auto Launch --> select the app to protect it.

Step 2: Settings --> Battery --> Power Saving Management --> App Protection, select the app and ignore it.



Lenovo

Settings --> Power Manager --> Background App Management, select the app and ignore it.



OnePlus

Settings --> Apps or Advanced or Battery --> gear icon or Recent Apps Management or Apps not optimized or Battery Optimizations --> App Autolaunch or Ensure Normal clear enabled or Don't Optimize or Advanced and toggle your app



Oppo

Settings --> "Security settings" --> "Data saving" and enable your app.



Samsung

Disable battery usage optimizations

Settings --> Device Management --> Battery --> Unmonitored apps --> Add your app

Make sure notifications are turned on for your app

Settings --> Apps --> Your app --> App Settigns --> Notifications --> Set as Priority



Sony

Tap on the battery icon. Go to Power Management --> STAMINA mode --> Apps active in standby --> Add your app.



Xiaomi/
Redmi

Security (App) --> Permissions --> Autostart - Enable your app

Settings --> Developer Options. Disable "memory optimization". To enabled Developer Options go to Settings --> About. Tap on MIUI 8 times. Full Instructions

More information on problematic devices can be found in our blog post: Notifications are highly reliable, except when device manufacturers interfere

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.

Action buttons or iOS 10+ media are set and requirements are not meet

iOS

The app must be not force killed and the correct settings must be enabled when these options are set.
See our Notifications with action buttons or iOS 10+ media not displaying section for a full check list.

Additional Debugging

Android

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


Web Specific

Web Push

Notifications are blocked in Settings

This is the most common reason. Check your browser settings on desktop or app settings on mobile:

Service Worker or PWA

If you have another service worker or PWA on the site, this can cause issues with the OneSignal Service Worker required for push notifications.

Please see our Service Worker guide on how to use OneSignal with a PWA or multiple service workers

Browser is Closed

Some browsers will not receive push if it is not running. More details in our Browser Behavior Guide.

Clearing Browser Data

Clearing your browser cookies, data, and/or history will cause the browser to not get notifications any longer and will need to revisit the site to re-subscribe.

Browser App Data Full

If your mobile browser app has reached its data limit or its data is full, you will need to clear the data on the app.

Unsupported Browser

Users must subscribe to notifications on their desktop or mobile device to receive notifications and it must be a browser that supports push notifications. Please see Supported Web Platforms.

Full Screen

Full screen mode in some older browser versions prevent web push notifications from appearing. Make sure no windows are in full screen mode. Please see Web Push Troubleshooting Docs for more.

Debugging Web Push Notifications

Please follow these simple steps to debug your site:

1. Use Chrome (or your favorite browser for debugging if a developer) and go to your site url with the OneSignal code. Open the JavaScript console. Generally, this is done by:

  • right click the site and press "Inspect", or
  • in the Chrome Menu select View > Developer > JavaScript Console

2. In the console use this code to send yourself a push notification if you are still subscribed:
OneSignal.sendSelfNotification();

3. If no notification shows up, please clear your browser permission and cookies to access your site as a first time user and resubscribe:

1. Click the lock next to your URL
2. Next to Notification, select "Ask (default)"
3. Click Cookies
4. Select your site
5. Click Remove
6. Click Done

4. Then in the Console use this code to get your new OneSignal Player ID:
OneSignal.getUserId(function(id){console.log(id)});

5. You can copy-paste that player id into your onesignal.com All Users page and add yourself as a Test User this will also tell you if you are subscribed correctly.

6. Repeat step 2 to send yourself a notification with OneSignal.sendSelfNotification();

If you still do not get the notification, contact support and provide your new player id and site URL with the OneSignal code.

Updated 13 days ago


Notifications Not Shown


Common reasons why push notifications are not showing on your device.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.