Commit 64496b2a by JDDV

Fixed bug that locationAlways returns PermenantlyDenied every time

parent 30939b0a
## 8.1.3
* Fix bug where `locationAlways` returns `PermanentlyDenied`;
* Updated the `README.md` for requesting the `locationAlways` permission the correct way.
## 8.1.2 ## 8.1.2
* Suppress deprecation warnings on iOS for code that specifically targets older iOS versions (see issue [#607](https://github.com/Baseflow/flutter-permission-handler/issues/607)). * Suppress deprecation warnings on iOS for code that specifically targets older iOS versions (see issue [#607](https://github.com/Baseflow/flutter-permission-handler/issues/607)).
......
...@@ -225,6 +225,10 @@ The following permissions will show no dialog, but will open the corresponding s ...@@ -225,6 +225,10 @@ The following permissions will show no dialog, but will open the corresponding s
- requestInstallPackages - requestInstallPackages
- accessNotificationPolicy - accessNotificationPolicy
The `locationAlways` permission can not be requested directly, the user has to request the `locationWhenInUse` permission first.
Accepting this permission by clicking on the 'Allow While Using App' gives the user the possibility to request the `locationAlways` permission.
This will then bring up another permission popup asking you to `Keep Only While Using` or to `Change To Always Allow`.
## Issues ## Issues
Please file any issues, bugs or feature request as an issue on our [GitHub](https://github.com/Baseflow/flutter-permission-handler/issues) page. Commercial support is available if you need help with integration with your app or services. You can contact us at [hello@baseflow.com](mailto:hello@baseflow.com). Please file any issues, bugs or feature request as an issue on our [GitHub](https://github.com/Baseflow/flutter-permission-handler/issues) page. Commercial support is available if you need help with integration with your app or services. You can contact us at [hello@baseflow.com](mailto:hello@baseflow.com).
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
if (_permissionStatusHandler == nil || @(_requestedPermission) == nil) { if (_permissionStatusHandler == nil || @(_requestedPermission) == nil) {
return; return;
} }
if ((_requestedPermission == PermissionGroupLocationAlways && status == kCLAuthorizationStatusAuthorizedWhenInUse)) {
return;
}
PermissionStatus permissionStatus = [LocationPermissionStrategy PermissionStatus permissionStatus = [LocationPermissionStrategy
determinePermissionStatus:_requestedPermission authorizationStatus:status]; determinePermissionStatus:_requestedPermission authorizationStatus:status];
......
name: permission_handler name: permission_handler
description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions. description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
version: 8.1.2 version: 8.1.3
homepage: https://github.com/baseflowit/flutter-permission-handler homepage: https://github.com/baseflowit/flutter-permission-handler
flutter: flutter:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment