I am using One Signal Push notification in my app. When my app is in closed that mean when I am not using of my app, I get push notification from one signal that is sent from my testing team. But when I am using an app, I did not get it.
Your answer is more appreciated.
Settings > Sounds & Vibration > Do Not Disturb: if this setting is enabled, Push Notifications will not be received. Make sure this is disabled. Settings > General > Background App Refresh: this setting allows the app to run in the background and must be turned on.
Reinstall the App or Wait for Updates One of the main reasons why your phone's notifications aren't working could be due to broken app updates. If your Android device is not getting notifications from one app in particular, it's possible that the developers have accidentally rolled out a buggy update.
This could happen because of slow internet issues on user's device. Under such circumstances, text would get loaded but image might still fail due to poor network.
Turn on notifications for Android devices Tap More on the bottom navigation bar and select Settings. Tap Turn on notifications. Tap Notifications. Tap Show notifications.
In latest version (3.+@aar) you should use inFocusDisplaying
:
OneSignal.startInit(this)
.inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification)
.init();
And you can set None
and InAppAlert
instead of Notification
.
By using this line,I can get the push notification though my app is in opened.
Link to refer
OneSignal.enableNotificationsWhenActive(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With