Open Redn4s opened 10 months ago
I was also getting this error and the problem was that I was calling requestPermission()
twice inside the codebase. calling it only once solved the problem.
I was also getting this error and the problem was that I was calling
requestPermission()
twice inside the codebase. calling it only once solved the problem.
I have called it just once still same issue
OneSignal.Notifications.canRequestPermission().then(can => {
if (can) OneSignal.Notifications.requestPermission(false)
})
solves this problem
What happened?
When requesting the push permission after the user already declined push permissions, the "Open settings" prompt is still shown even when I pass
false
when callingrequestPermission()
.OneSignal.Notifications.requestPermission(false) // Still shows the "Open settings" alert
Steps to reproduce?
What did you expect to happen?
I expect the "Open settings" prompt not to show up when I call
requestPermission(false)
after the user already declined push permissions.React Native OneSignal SDK version
5.0.4
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct