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
Unlike on iOS, requestPermission() doesn't resolve when the user denies the notification permission on Andriod (or if a prompt can't be shown).
On iOS, the method will resolve with either true or false.
On Android, the method only resolves if it's true.
Steps to reproduce?
Run the following:
window.plugins.OneSignal.Notifications.requestPermission(false).then(function (accepted) {
console.log(accepted)
})
If you deny permission, observe that nothing is printed.
What did you expect to happen?
The method should always resolve with either true or false.
OneSignal Cordova SDK version
5.0.1
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:
I can confirm this Issue! I wondered why my app didn't launch and the splash screen didn't disappear. It's really important for me that the function resolves correctly, so I can call OneSignal.User.pushSubscription.optIn(); at the right time.
What happened?
Unlike on iOS,
requestPermission()
doesn't resolve when the user denies the notification permission on Andriod (or if a prompt can't be shown).On iOS, the method will resolve with either
true
orfalse
.On Android, the method only resolves if it's
true
.Steps to reproduce?
What did you expect to happen?
The method should always resolve with either
true
orfalse
.OneSignal Cordova SDK version
5.0.1
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: