Enum PermissionRequestStrategy
- Namespace
- Bluetooth.Abstractions
- Assembly
- Bluetooth.Abstractions.dll
Defines when and how Bluetooth permissions should be requested.
public enum PermissionRequestStrategy
Fields
AssumeGranted = 2Assume permissions are granted, skip all checks. Use only when you've manually requested permissions elsewhere.
⚠️ WARNING: If permissions are not actually granted:
- Android: Will throw SecurityException from native code
- iOS: System will show permission dialog (cannot be prevented)
- Windows: May fail when accessing Bluetooth APIs
RequestAutomatically = 0Automatically request permissions when starting scanner/broadcaster or connecting to device. Recommended for most applications - provides best developer experience.
Platform behavior:
- iOS/macOS: No-op (CoreBluetooth shows system dialog automatically)
- Android: Requests permissions before operation
- Windows: Checks adapter state and requests radio access if needed
ThrowIfNotGranted = 1Throw BluetoothPermissionException if permissions not granted. Use when you want explicit control over permission dialogs.
Requires developer to call IBluetoothPermissionManager.RequestXXXPermissionsAsync() before starting scanner/broadcaster or connecting to device.