Android: one no-signal notification was not received while using the application

I am using the One Signal Push notification in my application. When my application is closed , which means that when I do not use my application, I receive a push notification from a single signal that is sent from my test group. But when I use the application , I have not received .

Your answer is more appreciated.

+5
source share
3 answers

In the latest version ( 3.+@aar ) you should use inFocusDisplaying :

 OneSignal.startInit(this) .inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification) .init(); 

And you can install None and InAppAlert instead of Notification .

+6
source

Using this line, I can get a push notification, although my application is open.

Link to link

 OneSignal.enableNotificationsWhenActive(true); 
+1
source

try it

 window.plugins.OneSignal.enableInAppAlertNotification(true); 
+1
source

Source: https://habr.com/ru/post/1246758/


All Articles