Viewing version 13.0.1. Open the latest package page.

permission_handler_android

13.0.1

Permission plugin for Flutter. This plugin provides the Android API to request and check permissions.

Download archive

Readme

permission_handler_android

pub package Build status style: flutter lints

The official Android implementation of the permission_handler plugin by Baseflow.

Usage

Since version 9.1.0 of the permission_handler plugin this is the endorsed Android implementation. This means it will automatically be added to your dependencies when you depend on permission_handler: ^9.1.0 in your applications pubspec.yaml.

More detailed instructions on using the API can be found in the README.md of the permission_handler package.

Issues

Please file any issues, bugs, or feature requests as an issue on our GitHub page. Commercial support is available, you can contact us at hello@baseflow.com.

Want to contribute

If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug, or adding a cool new feature), please carefully review our contribution guide and send us your pull request.

Author

This permission_handler plugin for Flutter is developed by Baseflow.

Changelog

13.0.1

  • fix: Resolve PermissionRequestInProgressException when app is relaunched with non-standard launchMode.

13.0.0

  • BREAKING CHANGES: When updating to version 13.0.0 make sure to also set the compileSdkVersion in the app/build.gradle file to 35.
  • Updates Android compileSdkVersion: 33 to 35
  • Updates Android com.android.tools.build:gradle:8.0.0 to com.android.tools.build:gradle:8.0.2
  • Updates Android sourceCompatibility = JavaVersion.VERSION_1_8 to sourceCompatibility = JavaVersion.VERSION_17

12.1.0

  • Updates the package to correctly support Flutter 3.29.
  • Migrates away from deprecated imperative Gradle plugins.

12.0.13

12.0.12

  • Fixes permission status returned from Permission.photos.request() or Permission.videos.request() when limited access selected

12.0.11

  • Adds TargetApi annotation to getManifestNames method in PermissionUtils.java.

12.0.10

  • Fixes a bug that causes a NullPointerException when the application is restarted after being killed by Android during the request of special permissions (like, Permission.ignoreBatteryOptimizations, Permission.systemAlertWindow, Permission.accessNotificationPolicy, Permission.scheduleExactAlarm and Permission.manageExternalStorage).

12.0.9

  • Makes the status returned when requesting the READ_MEDIA_VISUAL_USER_SELECTED permission more accurate.

12.0.8

  • Adds support for limited photo and video permission on Android.

12.0.7

  • Removes additional Android v1 embedding class reference.

12.0.6

  • Removes deprecated support for Android V1 embedding as support will be removed from Flutter (see flutter/flutter#144726).

12.0.5

  • Upgrades Gradle and Android Gradle plugin.

12.0.4

  • Returns granted on permission Permission.scheduleExactAlarm for devices running lower than Android S (API 31), before this change the default return was denied.
  • Updates minSdkVersion version to flutter.minSdkVersion.

12.0.3

  • Updates the dependency on permission_handler_platform_interface to version 4.1.0 (SiriKit support is only available for iOS or macOS).

12.0.2

  • Fixes bug where Android activity is leaked when embedded in native Android application.

12.0.1

  • Fixes a bug where the ignoreBatteryOptimizations permission didn't report the correct status when the permission is requested and granted.

12.0.0

  • BREAKING CHANGES:
    • Adds Permission.calendarWriteOnly.
    • Removes Permission.calendarReadOnly.

11.1.0

  • Implements the Permission.calendarReadOnly and PermissionCalendarFullAccess permissions.

11.0.5

  • Removes the obsolete updatePermissionShouldShowStatus method from the Java code base.
  • Fixes some analysis warnings in the Java code base.

11.0.4

  • Fixes a bug where the status of special permissions would incorrectly be reported as denied.

11.0.3

  • Fixes a bug where Permission.notification.status would never return permanentlyDenied on Android.

11.0.2

  • Fixes a bug where Permission.Phone would always return 'denied' when requesting the permission status.
  • Fixes a bug where Flutter permissions that require multiple Android permissions would base their status on the status of the first Android permission, as opposed to the result of all relevant Android permissions.

11.0.1

  • Fixes java.lang.IllegalStateException: Reply already submitted when requesting post notification permission.

11.0.0

  • BREAKING CHANGE: Fixes a bug where the permission status would return 'denied' regardless of whether the status was 'denied' or 'permanently denied'.

10.3.6

  • Fixes a bug where requesting multiple permissions would crash the app if at least one of the permissions was a special permission.

10.3.5

  • Fixes a bug where Permission.ScheduleExactAlarm was not opening the settings screen.

10.3.4

  • Fixes a bug where the permission status would return 'permanently denied' instead of 'denied' when the user dismisses the permission dialog.

10.3.3

  • Migrates the Gradle compile arguments to the example app, so they are not enforced upon consumers of the plugin.

10.3.2

  • Updates example app to show Permission.photos and hide Permission.bluetooth.

10.3.1

  • Fixes java.lang.IllegalStateException: Reply already submitted when checking the status of Bluetooth service.

10.3.0

  • Adds support for the new Android 13 permission: BODY_SENSORS_BACKGROUND.

10.2.3

  • Fix missing POST_NOTIFICATIONS permission in the Android example project.

10.2.2

  • Fixes the SCHEDULE_EXACT_ALARM status check on Android 12 and 13.

10.2.1

  • Adds compatibility with Android Gradle Plugin 8.0.

10.2.0

  • Adds support for the new Android 13 permissions: SCHEDULE_EXACT_ALARM, READ_MEDIA_IMAGES, READ_MEDIA_VIDEO and READ_MEDIA_AUDIO

10.1.0

  • Adds support for the new Android 13 permission: NEARBY_WIFI_DEVICES.

10.0.0

  • BREAKING CHANGE: Updates Android compileSdkVersion to 33 to handle the new POST_NOTIFICATIONS permission.

    When updating to version 10.0.0 make sure to update the android/app/build.gradle file and set the compileSdkVersion to 33.

9.0.2+1

  • Undoes PR #765 which by mistake requests write_external_storage permission based on the target SDK instead of the actual SDK of the Android device.

9.0.2

  • Moves Android implementation into its own package.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'permission_handler_android:13.0.1'
pubspec.yaml
name: permission_handler_android
description: Permission plugin for Flutter. This plugin provides the Android API to request and check permissions.
homepage: https://github.com/baseflow/flutter-permission-handler
version: 13.0.1

environment:
  sdk: ^3.5.0
  flutter: ">=3.24.0"

flutter:
  plugin:
    implements: permission_handler
    platforms:
      android:
        package: com.baseflow.permissionhandler
        pluginClass: PermissionHandlerPlugin

dependencies:
  flutter:
    sdk: flutter
  permission_handler_platform_interface: ^4.2.0

dev_dependencies:
  flutter_lints: ^5.0.0
  plugin_platform_interface: ^2.0.0

Version history

VersionPublishedArchiveSHA-256
9.0.2On demandDownloade17a8f02…845b05
9.0.2+1On demandDownloada512e0fa…8a28fc
10.0.0On demandDownload692e5dd6…a1869f
10.1.0On demandDownloada7b6bdc9…e02250
10.2.0On demandDownload8028362b…4159e2
10.2.1On demandDownloadd8cc6a62…27bfe8
10.2.2On demandDownloadf1044cf6…e62537
10.2.3On demandDownload8f6a95cc…a4ddf7
10.3.0On demandDownload3b61f3da…b2a89e
10.3.1On demandDownload37cedf9e…56a4b1
10.3.2On demandDownloadc0c97544…551d6f
10.3.3On demandDownload2ffaf52a…4cf221
10.3.4On demandDownloadd74e77a5…764ec3
10.3.5On demandDownload91799aea…bf3bda
10.3.6On demandDownload59c63221…5f9a47
11.0.0On demandDownload6901d50f…e120ac
11.0.1On demandDownloadf23cfe9a…d2608f
11.0.2On demandDownload740c9c9d…c01c15
11.0.3On demandDownloadf2543a23…276d3a
11.0.4On demandDownload770723b8…b1e67f
11.0.5On demandDownloadace7d15a…6fc790
11.1.0On demandDownloadf9fddd3b…59e76e
12.0.0On demandDownloadd6e4f2b8…7269b7
12.0.1On demandDownload2f1bec18…2dcfa6
12.0.2On demandDownload8da85e83…05b0ec
12.0.3On demandDownload758284a0…7374eb
12.0.4On demandDownloada5ebaa42…73082a
12.0.5On demandDownload1acac6ba…1c3474
12.0.6On demandDownload8bb852cd…5ba2c5
12.0.7On demandDownloadb29a799c…8b7e54
12.0.8On demandDownloadeaf2a1ec…097dca
12.0.9On demandDownload9525eb27…cc620c
12.0.10On demandDownloaddf5b18ff…21be63
12.0.11On demandDownload2e2a6483…1570c1
12.0.12On demandDownload76e4ab09…2490fa
12.0.13On demandDownload71bbecfe…21f9f1
12.1.0On demandDownloadd3971dcd…057ebc
13.0.0On demandDownload2d996f74…6122d5
13.0.1Cached · Upstream SHA-256 matchedDownload1e3bc410…7350e6
14.0.0On demandDownloadd7676c6f…9d6242
14.1.0On demandDownloadb1ce660f…437039
14.1.1Cached · Upstream SHA-256 matchedDownloadbaf93fbf…af6b6e

Dependencies

flutter { "sdk": "flutter" }

permission_handler_platform_interface "^4.2.0"