Commit a2ab8524 by Jeroen Weener Committed by GitHub

Update Bluetooth permission documentation (#1105)

* Update documentation

* Apply suggestions from code review

Co-authored-by: TimHoogstrate <tim566@hotmail.com>

---------

Co-authored-by: TimHoogstrate <tim566@hotmail.com>
parent eaac789a
## 3.11.3
* Updates the documentation for the `Permission.bluetooth` permission regarding the limitations of the permission on iOS.
## 3.11.2
* Changes `Permission.bluetooth` into an instance of `PermissionWithService` instead of `Permission` in order to determine iOS native's `CBManagerStatePoweredOn`.
......
......@@ -40,6 +40,14 @@ class MethodChannelPermissionHandler extends PermissionHandlerPlatform {
/// - **PLEASE NOTE that this is still not a perfect indication** of the
/// device's capability to place & connect phone calls as it also depends
/// on the network condition.
/// - **[Permission.bluetooth]**
/// - iOS:
/// - The method will **always** return [ServiceStatus.disabled] when the
/// Bluetooth permission was denied by the user. It is not possible
/// obtain the actual Bluetooth service status without having the
/// Bluetooth permission granted.
/// - The method will prompt the user for Bluetooth permission if the
/// permission was not requested before.
@override
Future<ServiceStatus> checkServiceStatus(Permission permission) async {
final status = await _methodChannel.invokeMethod(
......
......@@ -179,6 +179,17 @@ class Permission {
/// **iOS:**
/// - iOS 13 and above: The authorization state of Core Bluetooth manager.
/// - iOS below 13: always allowed.
///
/// Limitations:
/// - iOS 13.0 only: [bluetooth.status] is always [PermissionStatus.denied],
/// regardless of the actual status. For the actual permission state, use
/// [bluetooth.request]. Note that this will show a permission dialog if the
/// permission was not yet requested.
/// - All iOS versions: [bluetooth.serviceStatus] will **always** return
/// [ServiceStatus.disabled] when the Bluetooth permission was denied by the
/// user. It is impossible to obtain the actual Bluetooth service status
/// without having the Bluetooth permission granted. The method will prompt
/// the user for Bluetooth permission if the permission was not yet requested.
static const bluetooth = PermissionWithService._(21);
/// Permission for accessing the device's external storage. (Android R+ only).
......
......@@ -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.11.2
version: 3.11.3
dependencies:
flutter:
......
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