Commit 1ce7e229 by Maurits van Beusekom Committed by GitHub

Adds BODY_SENSORS_BACKGROUND support (#1073)

parent 5857bc81
## 3.11.0
* Adds support for the new Android 13 permission: BODY_SENSORS_BACKGROUND.
## 3.10.0 ## 3.10.0
* Adds support for the "Provisional" permission status introduced with iOS 12+. * Adds support for the "Provisional" permission status introduced with iOS 12+.
......
...@@ -67,8 +67,8 @@ class Permission { ...@@ -67,8 +67,8 @@ class Permission {
/// iOS: Nothing /// iOS: Nothing
static const phone = PermissionWithService._(8); static const phone = PermissionWithService._(8);
/// When running on Android T and above: Read image files from external storage /// When running on Android TIRAMISU and above: Read image files from external storage
/// When running on Android < T: Nothing /// When running on Android < TIRAMISU: Nothing
/// iOS: Photos /// iOS: Photos
/// iOS 14+ read & write access level /// iOS 14+ read & write access level
static const photos = Permission._(9); static const photos = Permission._(9);
...@@ -181,13 +181,13 @@ class Permission { ...@@ -181,13 +181,13 @@ class Permission {
///iOS: Nothing ///iOS: Nothing
static const nearbyWifiDevices = Permission._(31); static const nearbyWifiDevices = Permission._(31);
/// When running on Android T and above: Read video files from external storage /// When running on Android TIRAMISU and above: Read video files from external storage
/// When running on Android < T: Nothing /// When running on Android < TIRAMISU: Nothing
/// iOS: Nothing /// iOS: Nothing
static const videos = Permission._(32); static const videos = Permission._(32);
/// When running on Android T and above: Read audio files from external storage /// When running on Android TIRAMISU and above: Read audio files from external storage
/// When running on Android < T: Nothing /// When running on Android < TIRAMISU: Nothing
/// iOS: Nothing /// iOS: Nothing
static const audio = Permission._(33); static const audio = Permission._(33);
...@@ -196,6 +196,12 @@ class Permission { ...@@ -196,6 +196,12 @@ class Permission {
///iOS: Nothing ///iOS: Nothing
static const scheduleExactAlarm = Permission._(34); static const scheduleExactAlarm = Permission._(34);
/// Android:
/// When running on Android TIRAMISU and above: Background Sensors Permission
/// When running on Android < TIRAMISU: Nothing
/// iOS: Nothing
static const sensorsAlways = Permission._(35);
/// Returns a list of all possible [PermissionGroup] values. /// Returns a list of all possible [PermissionGroup] values.
static const List<Permission> values = <Permission>[ static const List<Permission> values = <Permission>[
calendar, calendar,
...@@ -211,6 +217,7 @@ class Permission { ...@@ -211,6 +217,7 @@ class Permission {
photosAddOnly, photosAddOnly,
reminders, reminders,
sensors, sensors,
sensorsAlways,
sms, sms,
speech, speech,
storage, storage,
...@@ -249,6 +256,7 @@ class Permission { ...@@ -249,6 +256,7 @@ class Permission {
'photosAddOnly', 'photosAddOnly',
'reminders', 'reminders',
'sensors', 'sensors',
'sensorsAlways',
'sms', 'sms',
'speech', 'speech',
'storage', 'storage',
......
...@@ -3,7 +3,7 @@ description: A common platform interface for the permission_handler plugin. ...@@ -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 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 # 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 # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 3.10.0 version: 3.11.0
dependencies: dependencies:
flutter: flutter:
......
...@@ -6,7 +6,7 @@ void main() { ...@@ -6,7 +6,7 @@ void main() {
() { () {
const values = Permission.values; const values = Permission.values;
expect(values.length, 35); expect(values.length, 36);
}); });
test('check if byValue returns corresponding PermissionGroup value', () { test('check if byValue returns corresponding PermissionGroup value', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment