File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed
permission_handler_platform_interface Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change
1
+ ## 4.0.1
2
+
3
+ * Updates Android documentation on how to use ` permission.photo ` on Android 12 (API 32) and below and Android 13 (API 33) and above.
4
+
1
5
## 4.0.0
2
6
3
7
* ** BREAKING CHANGE** : Replaces ` Permission.calendarReadOnly ` with ` Permission.calendarWriteOnly ` .
Original file line number Diff line number Diff line change @@ -94,13 +94,27 @@ class Permission {
94
94
/// Depending on the platform and version, the requirements are slightly
95
95
/// different:
96
96
///
97
- /// **Android:**
98
- /// - When running on Android 13 (API 33) and above: Read image files from
99
- /// external storage
100
- /// - When running below Android 13 (API 33): Nothing
101
- ///
102
97
/// **iOS:**
103
98
/// - When running Photos (iOS 14+ read & write access level)
99
+ ///
100
+ /// **Android:**
101
+ /// - Devices running Android 12 (API level 32) or lower: use [Permissions.storage] .
102
+ /// - Devices running Android 13 (API level 33) and above: Should use [Permissions.photos] .
103
+ ///
104
+ /// EXAMPLE: in Manifest:
105
+ /// <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
106
+ /// <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
107
+ ///
108
+ /// In Flutter to check the status:
109
+ ///
110
+ /// if (Platform.isAndroid) {
111
+ /// final androidInfo = await DeviceInfoPlugin().androidInfo;
112
+ /// if (androidInfo.version.sdkInt <= 32) {
113
+ /// use [Permissions.storage.status]
114
+ /// } else {
115
+ /// use [Permissions.photos.status]
116
+ /// }
117
+ /// }
104
118
static const photos = Permission ._(9 );
105
119
106
120
/// Permission for adding photos to the device's photo library (iOS only).
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ description: A common platform interface for the permission_handler plugin.
3
3
homepage : https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_platform_interface
4
4
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
5
5
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
6
- version : 4.0.0
6
+ version : 4.0.1
7
7
8
8
dependencies :
9
9
flutter :
You can’t perform that action at this time.
0 commit comments