@@ -23,19 +23,24 @@ Since version 4.4.0 this plugin is implemented using the Flutter 1.12 Android pl
As of version 3.1.0 the <kbd>permission_handler</kbd> plugin switched to the AndroidX version of the Android Support Libraries. This means you need to make sure your Android project is also upgraded to support AndroidX. Detailed instructions can be found [here](https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility).
The TL;DR version is:
1. Add the following to your "gradle.properties" file:
```
```properties
android.useAndroidX=true
android.enableJetifier=true
```
2. Make sure you set the `compileSdkVersion` in your "android/app/build.gradle" file to 31:
```
1. Make sure you set the `compileSdkVersion` in your "android/app/build.gradle" file to 31:
```gradle
android{
compileSdkVersion31
...
}
```
3. Make sure you replace all the `android.` dependencies to their AndroidX counterparts (a full list can be found here: https://developer.android.com/jetpack/androidx/migrate ).
1. Make sure you replace all the `android.` dependencies to their AndroidX counterparts (a full list can be found [here](https://developer.android.com/jetpack/androidx/migrate)).
Add permissions to your `AndroidManifest.xml` file.
There's a `debug`, `main` and `profile` version which are chosen depending on how you start your app.
...
...
@@ -57,6 +62,7 @@ The <kbd>permission_handler</kbd> plugin use [macros](https://github.com/Baseflo
You must list permission you want to use in your application :
1. Add the following to your `Podfile` file:
```ruby
post_installdo|installer|
installer.pods_project.targets.eachdo|target|
...
...
@@ -120,14 +126,18 @@ You must list permission you want to use in your application :
end
end
```
2. Remove the `#` character in front of the permission you do want to use. For example if you need access to the calendar make sure the code looks like this:
@@ -148,8 +158,6 @@ You must list permission you want to use in your application :
</details>
## How to use
There are a number of [`Permission`](https://pub.dev/documentation/permission_handler_platform_interface/latest/permission_handler_platform_interface/Permission-class.html#constants)s.