How to disable OneSignal on Android?

I want to use OneSignalin my application to send notifications to my users, and this is well documented and good, you should just act as follows:

https://documentation.onesignal.com/docs/android-sdk-setup

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

The problem is that I just want to send a notification to my registered users, so if the user is logged out, I do not want him to receive a notification, how can I disconnect OneSignalafter entering it?

I do not want to process this on the server, this should somehow stop the service OneSignal, I think.

+4
source share
3 answers

OneSignal has something called segments ... (flags).

OneSignal. , , .

, , OneSignal loggedin. , OneSignal . , loggedin.

+2

OneSignal.setSubscription(false); "USers Opted Out" , ?? ?

0

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


All Articles