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

Troubleshooting
For Developers

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.

Network issues

All

The network / WiFi you're connected to 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.


Mobile Specific

The app is currently In Focus

iOS, Android, Amazon, Windows Phone

By default, notifications will not be displayed on the device if your app is currently "in focus" (open and visible). However, you can call inFocusDisplaying with InAppAlert to show notifications as alert boxes in your app, or Notification to display the notification.

The app is Force Stopped

Android

When an app is in a "Force Stopped" state most events including GCM/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 on a Xiaomi device.
  • Automatically on some devices due to custom Android tweaks done by manufactures. Steps below on disabling this.

Huawei

Step 1: settings --> advanced settings --> battery manager --> select the app to protect it.

Step 2: settings --> apps --> advanced --> 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

Sony

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

Asus

Check your app in the Auto-start Manager.

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

Oppo

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

OnePlus

Go to Settings > Battery > Battery Optimization > Application > Don't Optimize

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.

The app has push permissions Disabled

iOS, Android

iOS - Check your app under Settings > Notifications.

Android - Check the notification setting under Settings > Apps

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

Full Screen

Full screen mode prevents web push notifications from appearing. Make sure no windows are in full screen mode.

Please see Web Push Troubleshooting Docs for more.

Notifications are blocked in Settings

Check your browser settings on desktop or app settings on mobile:

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.