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

[Bug]: Android: canRequestPermission() says true when it should say false #927

Closed
2 of 3 tasks
terreng opened this issue Sep 30, 2023 · 3 comments
Closed
2 of 3 tasks

Comments

@terreng
Copy link

terreng commented Sep 30, 2023

What happened?

Sometimes, when canRequestPermission() resolves to true, a subsequent call to requestPermission() fails to show a prompt. This is to say that sometimes canRequestPermission() says true when it should really say false.

Steps to reproduce?

1. Call `requestPermission()` a few times and keep declining the permission until it stops showing a prompt.
2. Call `canRequestPermission()` and observe that it resolves to `true`, which is wrong.

What did you expect to happen?

canRequestPermission() resolving to true should imply that a following call to requestPermission() will show a prompt.

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
@nan-li
Copy link
Contributor

nan-li commented Oct 23, 2023

Hi @terreng,

Thank you for reporting. I was able to reproduce there is some inconsistency with canRequestPermission.

We will investigate how to resolve this issue.

@kpturner
Copy link

What happened to the resolution? Is it fixed somewhere in some new release?

@jennantilla
Copy link
Contributor

Hello there--apologies that this issue has gone stale. We have made many improvements to our SDK since this was reported that should resolve this issue. Please update to our latest version and if you still have any problems, feel free to create a new issue. Thanks!

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

No branches or pull requests

4 participants