Skip to content

Commit

Permalink
added documentation for issue 1222 (#1229)
Browse files Browse the repository at this point in the history
Co-authored-by: Maurits van Beusekom <[email protected]>
  • Loading branch information
TimHoogstrate and mvanbeusekom authored Aug 16, 2024
1 parent 9ee4822 commit 5b4ff8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions permission_handler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ If your application needs access to Android's file system, it is possible to req

Starting with Android 10, apps are required to first obtain permission to read the device's location in the foreground, before requesting to read the location in the background as well. When requesting the 'location always' permission directly, or when requesting both permissions at the same time, the system will ignore the request. So, instead of calling only `Permission.location.request()`, make sure to first call either `Permission.location.request()` or `Permission.locationWhenInUse.request()`, and obtain permission to read the GPS. Once you obtain this permission, you can call `Permission.locationAlways.request()`. This will present the user with the option to update the settings so the location can always be read in the background. For more information, visit the [Android documentation on requesting location permissions](https://developer.android.com/training/location/permissions#request-only-foreground).

### onRequestPermissionsResult is called without results. What can I do?

It is probably caused by a difference between completeSdkVersion and targetSdkVersion. It can be depending on the flutter version that you use. `targetSdkVersion = flutter.targetSdkVersion` in the app/build.gradle indicates that the targetSdkVersion is flutter version dependant. For more information: [issue 1222](https://github.com/Baseflow/flutter-permission-handler/issues/1222)

### Checking or requesting a permission terminates the application on iOS. What can I do?

First of all make sure all that the `ios/Runner/Info.plist` file contains entries for all the permissions the application requires. If an entry is missing iOS will terminate the application as soon as the particular permission is being checked or requested.
Expand Down

0 comments on commit 5b4ff8d

Please sign in to comment.