-
-
Notifications
You must be signed in to change notification settings - Fork 28
Description
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
- Create a project to ask for a permission (I was requesting the Camera).
- Choose "Not Allow"
- Request the permission a second time and choose "Not Allow" again
- Then go into the settings (either using the OpenSettings() call or by manually long pressing the app and selecting App Info)
- Change the permission from Not Allowed to Ask Every Time
- 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