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

Android 12: When user grants only coarse location, EasyPermissions incorrectly determines fine location as permanently denied #341

Open
ahaapaka opened this issue Jan 7, 2022 · 1 comment

Comments

@ahaapaka
Copy link

ahaapaka commented Jan 7, 2022

Basic Information

Device type: emulator
OS version: Android 12
EasyPermissions version: 3.0.0

Describe the problem

  1. App request both ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION
    -- As instructed in https://developer.android.com/training/location/permissions#approximate-request
  2. User grants access to approximate location
  3. EasyPermission library returns ACCESS_FINE_LOCATION as denied permission
  4. EasyPermissions.permissionPermanentlyDenied(ACCESS_FINE_LOCATION) returns true

What happened? What did you expect to happen?

ACCESS_FINE_LOCATION is determined as permanently denied immediately after first permission dialog. This is incorrect because app can request location permissions again (next time system asks user to upgrade from approximate to precise location).

With Android 12 location permissions and EasyPermissions lib 3.0.0 I could not find a reliable way to determine when to show AppSettingsDialog (i.e. when permission is actually permanently denied and system returns result without displaying a dialog).

Code and logs

I can add later if needed.

@johnnyzen
Copy link

I am having same issue. Is this repo maintained?

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

2 participants