Baseflow / Baseflow/flutter-permission-handler

locationAlways does not work on Android 10

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

Description

## 🔙 Regression
When requesting locationAlways on Android 10, the Runtime Permission dialog does not appear and the API is returned immediately.

According to the Android specification, the "Allow all the time" option is included even when requesting background location on Android 10.
https://developer.android.com/training/location/permissions#request-background-location

### Old (and correct) behavior
Version:8.3.0
When I request locationAlways on Android 10, the Runtime Permission dialog appears and I can select "Allow all the time".

### Current behavior
Version: 10.0.0
Runtime Permission does not appear on Android 10.

### Reproduction steps
Do the following on Android 10 device.

`await Permission.locationAlways.request();`

### Configuration

**Version:** 10.0.0

**Platform:**
- [ ] :iphone: iOS
- [x] :robot: Android

**flutter doctor:**
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.5.1 21G83 darwin-x64, locale en-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.71.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.