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
However I am finding that the method always returns true, despite being shown the permission request (using Notifications.requestPermission()) and denying it multiple times.
I have only tested Android but may also affect iOS but not tested.
What! That's crazy! Why would it do that? Is there no way to determine if I can/should show a custom message about turning on notifications in the settings?
Do you work at OneSignal? Can somebody at OneSignal explain this? The description (and the fact it is a Boolean) suggests it could be true or false.
What happened?
According to the docs the
Notification.canRequestPermission()
should "Return true if the device has never been prompted for push notification permission."https://documentation.onesignal.com/docs/mobile-sdk#checking-if-a-permissions-prompt-can-be-displayed
However I am finding that the method always returns true, despite being shown the permission request (using
Notifications.requestPermission()
) and denying it multiple times.I have only tested Android but may also affect iOS but not tested.
Steps to reproduce?
What did you expect to happen?
Expected the
canAsk
method to returnfalse
when the permission has been deniedReact Native OneSignal SDK version
5.0.0
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: