[Bug]: OptIn() is not working and not updating OneSignal Dashboard
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 https://github.com/OneSignal/OneSignal-Android-SDK/issues/1837 https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/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
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
- [X] I agree to follow this project's Code of Conduct
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?
Thanks!
Closing due to no response