Skip to content

Status of permission is Denied after choose approximately location in request permission dialog #984

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

Open
1 of 2 tasks
thao-vu-0106 opened this issue Jan 30, 2023 · 9 comments
Labels
P2 Important issues not at the top of the work list. platform: android Issue is related to the Android platform. platform: android 12 type: bug Something isn't working

Comments

@thao-vu-0106
Copy link

🐛 Bug Report

In android 12 or higher, when request both ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION will show dialog to choose precise location or approximate location.
Screen Shot 2023-01-30 at 11 06 48

when choose approximate location, the apps will grant only ACCESS_COARSE_LOCATION.
image

But the constant Permission.location in permission_handler will be "isGranted" only both ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION are allowed.
image

link reference: https://developer.android.com/training/location/permissions

After request permission location, i will get current location when granted and show dialog for user when the permission is denied. Because of above problem, when i choose approximate location, the app always show the dialog rather than requesting permission.

Expected behavior

  • The value of Permission.location should be granted

Reproduction steps

  • choose approximate location when request location then observe the status of Permission.location

Configuration

  • Android 12 or higher
    Version: 10.0.1

Platform:

  • 📱 iOS
  • 🤖 Android
@enricocaliolo
Copy link

I am having the same issue. I noticed that, when choosing approximate location, the permission returns as PermanentlyDenied, which is not the expected behaviour, as, at least my app, could still work with only approximate location.

Also, I don't see a way, in this package, to handle the dialog that asks you to change to precise location or to change to approximate location, after choosing approximate location in the first permission dialog. Choosing to keep approximate location still leaves the permission as PermanentlyDenied. This dialog appears two times before not appearing anymore, so there is not a rationale for it either.

image

@TimHoogstrate TimHoogstrate added the type: bug Something isn't working label Jun 29, 2023
@JeroenWeener JeroenWeener added platform: android Issue is related to the Android platform. P2 Important issues not at the top of the work list. labels Jul 3, 2023
@Robbinb1993
Copy link

I have the same problem for coarse (approximate) location. Any update on this issue?

@kostov
Copy link

kostov commented Aug 17, 2023

There is need to know which location (approximate or precise) was selected due to some functionality depends on it. For example, network_info_plus will do not work correctly if approximate location permission is granted.
Right now, if approximate location permission is granted by end-user, Permission.locationWhenInUse.status == PermissionStatus.denied on Android, but == PermissionStatus.granted on iOS.

@JeroenWeener
Copy link
Contributor

Related to #559

@wojciechzahradnikdeviniti
Copy link

wojciechzahradnikdeviniti commented Sep 4, 2023

Hi, any updates?

@JeroenWeener JeroenWeener mentioned this issue Sep 15, 2023
5 tasks
@idealgeek007
Copy link

Any update on this ?
I'm facing the same issue
image
image

@wujek-srujek
Copy link
Contributor

There is need to know which location (approximate or precise) was selected due to some functionality depends on it.

@kostov Interesting, I've just opened a feature request asking for exactly this, see #1356 and vote ;>

@Hoai-Phong
Copy link

@idealgeek007 same
image

@akadatsky
Copy link

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Important issues not at the top of the work list. platform: android Issue is related to the Android platform. platform: android 12 type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests