Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question]: No response on PromptForPush() #710

Closed
1 task done
G-r-i-n-c-h opened this issue Mar 21, 2024 · 4 comments
Closed
1 task done

[question]: No response on PromptForPush() #710

G-r-i-n-c-h opened this issue Mar 21, 2024 · 4 comments

Comments

@G-r-i-n-c-h
Copy link

How can we help?

Just Checking if the behavior is correct.
Using new 5.1.1 version of the SDK and Example app from git.
On android 12 and bellow calling PromptForPush() does not give callback at all.
the last line on console is
"Opening permission prompt for push notifications and awaiting result..."
However on android 13+ it pops up default notification view and all works as expected.
Does anyone have the same problem ? (its clean example project nothing has been changed)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@shepherd-l
Copy link
Contributor

shepherd-l commented Mar 21, 2024

Good question! Thanks for bringing this to our attention

OneSignal.Notifications.RequestPermissionAsync() does not return if notification permission is already granted and awaits forever. This is a bug and is true for both Android 12 and 13. We plan to fix this in a future release so that it returns true if permission is already granted.

@snoova
Copy link

snoova commented Mar 22, 2024

@shepherd-l Any workaround available for this one?

@shepherd-l
Copy link
Contributor

@snoova

I recommend checking that OneSignal.Notifications.Permission is false inorder to call await OneSignal.Notifications.RequestPermissionAsync();

@shepherd-l
Copy link
Contributor

This should be fixed in the latest 5.1.7 release. Please create a new issue if this is still a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants