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.
source
share