GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Ask Every Time doesn't work if the user updates from Denied to Ask Every Time · Issue #14 · yasirkula/UnityAndroidRuntimePermissions

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

New issue
Copy link
New issue
Copy link
Closed
Closed
Ask Every Time doesn't work if the user updates from Denied to Ask Every Time#14
Copy link
Labels
bugSomething isn't working

Description

@jmcgee412
jmcgee412
opened on May 20, 2023
Issue body actions

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

Activity

  1. jmcgee412
    added
    bugSomething isn't working
    on May 20, 2023
  2. yasirkula
    closed this as completedin 2113d0bon Jul 9, 2023
  3. yasirkula
    added a commit that references this issue on Mar 25, 2025

    - BREAKING CHANGE: Replaced RequestPermission with RequestPermissionA…

    1750c04
  4. yasirkula
    added 3 commits that reference this issue on Apr 7, 2025

    - BREAKING CHANGE: CheckPermission returns bool instead of Permission…

    f8f591e

    - BREAKING CHANGE: CheckPermission returns bool instead of Permission…

    07a6817

    - BREAKING CHANGE: CheckPermission returns bool instead of Permission…

    c8528c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.