Reputation: 61
I have successfully implemented push notification for my android app using OneSignal. I have implemented a checkbox in settings to enable user to opt out from receiving notifications. I passed OneSignal.setSubscription(false); but it is having no effect whatsoever and I am still able to receive notifications. Any pointers are highly appreciated. Thanks
Upvotes: 1
Views: 1248
Reputation: 61
It's really weird why it didn't work for 100 times i tried yesterday and now it started working with the same code :/
Upvotes: 0
Reputation: 686
Are you sure you are initialising onesignal properly.
Check if the checkbox selected value is true/false.Or try setting OneSignal.setSubscription(false)
and check.
Upvotes: 1