Skip to content

Ask Every Time doesn't work if the user updates from Denied to Ask Every Time #14

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

Closed
jmcgee412 opened this issue May 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jmcgee412
Copy link

Description of the bug

If the user chooses "Not Allow" twice, the permission becomes denied like it is supposed to. But if the user opens the settings afterwards and changes it to "Ask Every Time" then CheckPermission() will still show as Denied instead of ShouldAsk, and RequestPermission() will not pull up the request. It will basically continue to act like it is still denied

Reproduction steps

  1. Create a project to ask for a permission (I was requesting the Camera).
  2. Choose "Not Allow"
  3. Request the permission a second time and choose "Not Allow" again
  4. Then go into the settings (either using the OpenSettings() call or by manually long pressing the app and selecting App Info)
  5. Change the permission from Not Allowed to Ask Every Time
  6. Go back to the app and CheckPermission will still show as Denied. And calling RequestPermission will not work
  • Interestingly here, Unity's RequestUserPermission() call WILL work here to bring up the permission request again (but that's not super helpful because Unity's version still shows it as Denied if you check the permission, and Unity's version has other inconsistent issues)

Platform specs

Please provide the following info if this is a Unity 3D repository.

  • Unity version: 2020.3.48f1
  • Platform: Android (Unity build on Windows)
  • Device: Samsung Galaxy S22 Ultra running Android 13
  • How did you download the plugin: Package Manager downloaded from the Asset Store

Additional info

Otherwise it works great!!

This bug makes me concerned that people who want to be asked every time for the camera when the app starts will run into problems where the app stops working for them, either because they accidentally denied the permission one time or when the Android OS eventually revokes the permission automatically because the app wasn't used in a while

@jmcgee412 jmcgee412 added the bug Something isn't working label May 20, 2023
yasirkula added a commit to yasirkula/UnitySimpleFileBrowser that referenced this issue Mar 25, 2025
…sync (see yasirkula/UnityNativeGallery#343)

- BREAKING CHANGE: CheckPermission returns bool instead of Permission (see yasirkula/UnityAndroidRuntimePermissions#14)
- Updated Unity version to 2021.3.41f1
- Upgraded Texts to TextMesh Pro (closed #82)
- Configurable Enter Play Mode is supported (disabling Domain Reload works but disabling Scene Reload isn't tested)
- FileBrowser.Instance is now public for convenience
- Removed nested canvases from SimpleFileBrowserCanvas prefab to make VR integration simpler
yasirkula added a commit to yasirkula/UnityNativeGallery that referenced this issue Apr 7, 2025
… (see yasirkula/UnityAndroidRuntimePermissions#14)

- BREAKING CHANGE: Replaced RequestPermission with RequestPermissionAsync (see #343)
- BREAKING CHANGE: Removed CanOpenSettings since it's now always true
- Updated Unity version to 2021.3.41f1 (simplified codebase accordingly)
- iOS frameworks are now added properly instead of changing OTHER_LDFLAGS
- Fixed Xcode compiler warnings
yasirkula added a commit to yasirkula/UnityNativeCamera that referenced this issue Apr 7, 2025
… (see yasirkula/UnityAndroidRuntimePermissions#14)

- BREAKING CHANGE: Replaced RequestPermission with RequestPermissionAsync (see yasirkula/UnityNativeGallery#343)
- BREAKING CHANGE: Removed CanOpenSettings since it's now always true
- Updated Unity version to 2021.3.41f1 (simplified codebase accordingly)
- iOS frameworks are now added properly instead of changing OTHER_LDFLAGS
- Fixed Xcode compiler warnings
yasirkula added a commit to yasirkula/UnityNativeFilePicker that referenced this issue Apr 7, 2025
… (see yasirkula/UnityAndroidRuntimePermissions#14)

- BREAKING CHANGE: Replaced RequestPermission with RequestPermissionAsync (see yasirkula/UnityNativeGallery#343)
- Updated Unity version to 2021.3.41f1 (simplified codebase accordingly)
- iOS frameworks are now added properly instead of changing OTHER_LDFLAGS
- Fixed Xcode compiler warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant