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
If push notification permission has been denied, then when you use the requestPermission method passing true to fallback to the settings, the native settings prompt pops up. You can then give permission via the settings and return to the app. The requestPermission promise then resolves returning true (the user gave permission). However, on an Android 12 device (in this case a Nexus 6 running API 31) it always returns false.
To work around this, you can call hasPermission to get the correct value immediately after the requestPermission has resolved. However, if you call that method again for any other reason, it will always return false. Only by restarting the app will requestPermission return the correct value.
Steps to reproduce?
Use a Nexus 6 API 31 Android 12 emulator and test the requestPermission method with fallback enabled.
What did you expect to happen?
Should work as with later versions of Android.
OneSignal Cordova SDK version
Release 5.0.4
Which platform(s) are affected?
iOS
Android
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:
What happened?
If push notification permission has been denied, then when you use the
requestPermission
method passingtrue
to fallback to the settings, the native settings prompt pops up. You can then give permission via the settings and return to the app. TherequestPermission
promise then resolves returningtrue
(the user gave permission). However, on an Android 12 device (in this case a Nexus 6 running API 31) it always returnsfalse
.To work around this, you can call
hasPermission
to get the correct value immediately after therequestPermission
has resolved. However, if you call that method again for any other reason, it will always return false. Only by restarting the app willrequestPermission
return the correct value.Steps to reproduce?
What did you expect to happen?
Should work as with later versions of Android.
OneSignal Cordova SDK version
Release 5.0.4
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: