flutter-permission-handler icon indicating copy to clipboard operation
flutter-permission-handler copied to clipboard

Fix locationAlways does not work on Android 10

Open hirameee55 opened this issue 1 year ago • 1 comments

:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)

This change fixes the regression described in Issue #917.

:arrow_heading_down: What is the current behavior?

The current behavior is that Runtime Permission is not shown when requesting locationAlways on Android 10 (Q).

:new: What is the new behavior (if this is a feature change)?

In Android Q (10), it is possible to request background and foreground permissions at the same time. LocationAlways satisfies this. Android 11 (R) or higher cannot request background and foreground permissions at the same time, so v10.0.1 behavior is not affected. These are Android specifications. https://developer.android.com/training/location/permissions#request-background-location

:boom: Does this PR introduce a breaking change?

No.

:bug: Recommendations for testing

When I request locationAlways on Android 10 (Q), the Runtime Permission appears and I can select "Allow all the time".

:memo: Links to relevant issues/docs

:thinking: Checklist before submitting

  • [X] I made sure all projects build.
  • [X] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • [X] I updated CHANGELOG.md to add a description of the change.
  • [X] I followed the style guide lines (code style guide).
  • [X] I updated the relevant documentation.
  • [X] I rebased onto current master.

hirameee55 avatar Sep 23 '22 11:09 hirameee55

@mvanbeusekom I need the approval of the maintainer to have it reviewed.

hirameee55 avatar Sep 27 '22 06:09 hirameee55