Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
permission_handler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
permission_handler
Commits
f1efd8bd
Unverified
Commit
f1efd8bd
authored
Oct 06, 2022
by
Yannick Maljaars
Committed by
GitHub
Oct 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for new Android media and alarm permissions (#933)
parent
adf246fc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
permission_handler_platform_interface/CHANGELOG.md
+4
-0
permission_handler_platform_interface/lib/src/permissions.dart
+25
-3
permission_handler_platform_interface/pubspec.yaml
+1
-1
permission_handler_platform_interface/test/src/permissions_test.dart
+1
-1
No files found.
permission_handler_platform_interface/CHANGELOG.md
View file @
f1efd8bd
## 3.9.0
*
Added support for the new Android 13 permissions: SCHEDULE_EXACT_ALARM, READ_MEDIA_IMAGES, READ_MEDIA_VIDEO and READ_MEDIA_AUDIO
## 3.8.0
*
Added support for the new Android 13 permission: NEARBY_WIFI_DEVICES.
...
...
permission_handler_platform_interface/lib/src/permissions.dart
View file @
f1efd8bd
...
...
@@ -67,7 +67,8 @@ class Permission {
/// iOS: Nothing
static
const
phone
=
PermissionWithService
.
_
(
8
);
/// Android: Nothing
/// When running on Android T and above: Read image files from external storage
/// When running on Android < T: Nothing
/// iOS: Photos
/// iOS 14+ read & write access level
static
const
photos
=
Permission
.
_
(
9
);
...
...
@@ -180,6 +181,21 @@ class Permission {
///iOS: Nothing
static
const
nearbyWifiDevices
=
Permission
.
_
(
31
);
/// When running on Android T and above: Read video files from external storage
/// When running on Android < T: Nothing
/// iOS: Nothing
static
const
videos
=
Permission
.
_
(
32
);
/// When running on Android T and above: Read audio files from external storage
/// When running on Android < T: Nothing
/// iOS: Nothing
static
const
audio
=
Permission
.
_
(
33
);
/// When running on Android S and above: Allows exact alarm functionality
/// When running on Android < S: Nothing
///iOS: Nothing
static
const
scheduleExactAlarm
=
Permission
.
_
(
34
);
/// Returns a list of all possible [PermissionGroup] values.
static
const
List
<
Permission
>
values
=
<
Permission
>[
calendar
,
...
...
@@ -213,7 +229,10 @@ class Permission {
bluetoothScan
,
bluetoothAdvertise
,
bluetoothConnect
,
nearbyWifiDevices
nearbyWifiDevices
,
videos
,
audio
,
scheduleExactAlarm
];
static
const
List
<
String
>
_names
=
<
String
>[
...
...
@@ -248,7 +267,10 @@ class Permission {
'bluetoothScan'
,
'bluetoothAdvertise'
,
'bluetoothConnect'
,
'nearbyWifiDevices'
'nearbyWifiDevices'
,
'videos'
,
'audio'
,
'scheduleExactAlarm'
];
@override
...
...
permission_handler_platform_interface/pubspec.yaml
View file @
f1efd8bd
...
...
@@ -3,7 +3,7 @@ description: A common platform interface for the permission_handler plugin.
homepage
:
https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version
:
3.
8
.0
version
:
3.
9
.0
dependencies
:
flutter
:
...
...
permission_handler_platform_interface/test/src/permissions_test.dart
View file @
f1efd8bd
...
...
@@ -6,7 +6,7 @@ void main() {
()
{
const
values
=
Permission
.
values
;
expect
(
values
.
length
,
3
2
);
expect
(
values
.
length
,
3
5
);
});
test
(
'check if byValue returns corresponding PermissionGroup value'
,
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment