Baseflow / Baseflow/flutter-permission-handler

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

Open
#984 11 comments 17 reactions 0 assignees View on GitHub
P2 platform: android platform: android 12 type: bug
Dominant language
Dart
Stars
2.2k
Forks
970
Avg merge
14h 22m
Merged PRs (30d)
2

Description

## 🐛 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](https://user-images.githubusercontent.com/102939631/215386783-d666fa20-8504-4181-8ace-7982a6beff4b.png)

when choose approximate location, the apps will grant only ACCESS_COARSE_LOCATION.
![image](https://user-images.githubusercontent.com/102939631/215386867-6d4878fb-e063-4075-8a87-7e21f0e430e9.png)

But the constant Permission.location in permission_handler will be "isGranted" only both ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION are allowed.
![image](https://user-images.githubusercontent.com/102939631/215386921-c1461b62-ec3d-4de1-88d3-0719af696258.png)

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:**
- [ ] :iphone: iOS
- [x] :robot: Android

Contributor guide

Open the contributing guide

Research direction

Reproduce the permission request on Android 12 or higher with permission_handler 10.0.1, choosing approximate location, and inspect the status returned for Permission.location. Read the linked Android location-permissions guidance and trace how ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION are mapped to that status; done means approximate location reports Permission.location as granted without triggering a denial dialog.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.