You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling OneSignal.getUser().getPushSubscription().optOut() does opt the user out as reflected on the dashboard. However, immediately calling OneSignal.getUser().getPushSubscription().optIn() doesn't change the opt-in status, user is still opt-out on the dashboard and cannot receive notifications.
And they mentioned that it was solved in newer release but its still not working
Also I did put debug points in below code and it is going into the respective optIn() and optOut()
And optOut() works as expected as well it changes status on Dashboard
But when we turn it on from settings it goes into OptIn() condition but its not doing anything on OneSignal side
if (isEnabled) {
OneSignal.getUser().getPushSubscription().optIn();
} else {
OneSignal.getUser().getPushSubscription().optOut();
}
Also I am using requestPermission to prompt the dialog for notification permission
Steps to reproduce?
Mentioned above
What did you expect to happen?
User should change the status subscribed after calling optIn in OneSignal dashboard and should be able to send the notification successfully
OneSignal Android SDK version
5.1.13
Android version
13
Specific Android models
No response
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
simranthakkar1996
changed the title
[Bug]:
[Bug]: OptIn() is not working and not updating OneSignal Dashboard
May 30, 2024
Hello @simranthakkar1996 thank you for reaching out! Would you be able to send over a log of from the device reproducing this behavior so we can see if there are any clues there?
What happened?
Using 5.1.13 release.
Calling OneSignal.getUser().getPushSubscription().optOut() does opt the user out as reflected on the dashboard. However, immediately calling OneSignal.getUser().getPushSubscription().optIn() doesn't change the opt-in status, user is still opt-out on the dashboard and cannot receive notifications.
I tried referring 2 bugs that were reported
#1837
OneSignal/OneSignal-Flutter-SDK#729
And they mentioned that it was solved in newer release but its still not working
Also I did put debug points in below code and it is going into the respective optIn() and optOut()
And optOut() works as expected as well it changes status on Dashboard
But when we turn it on from settings it goes into OptIn() condition but its not doing anything on OneSignal side
Also I am using requestPermission to prompt the dialog for notification permission
Steps to reproduce?
What did you expect to happen?
User should change the status subscribed after calling optIn in OneSignal dashboard and should be able to send the notification successfully
OneSignal Android SDK version
5.1.13
Android version
13
Specific Android models
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: