Add requestConnectionPriority support (#221)
* feat: add requestConnectionPriority - Add BleConnectionPriority enum (balanced, highPerformance, lowPower) - Add BleCapabilities.supportsConnectionPriorityApi flag - Implement on Android via BluetoothGatt.requestConnectionPriority() - Throw notSupported on iOS, macOS, Windows, Linux, and Web - Update pigeon definition and regenerate platform channel files - Bump version 1.2.0 -> 1.3.0 * fix: improve requestConnectionPriority implementation - Remove redundant BleCapabilities guard in Dart layer (native handles it) - Add BleConnectionPriority Kotlin enum mirroring Dart enum - Map to explicit Android SDK constants via when expression - Add firstOrNull with ILLEGAL_ARGUMENT for unknown priority values - Add catch (e: Exception) block for broader error handling - Fix enum doc comment (throws belongs on method, not enum) - Remove stale capability check guidance from docs and README --------- Co-authored-by: aqeel-bmec-co <aqeel@bmec.co> Co-authored-by: aqeel-bmec-co <85945830+aqeel-bmec-co@users.noreply.github.com>
This commit is contained in:
@@ -103,6 +103,12 @@ class MockUniversalBle extends UniversalBlePlatform {
|
||||
return 512;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> requestConnectionPriority(
|
||||
String deviceId,
|
||||
BleConnectionPriority priority,
|
||||
) async {}
|
||||
|
||||
@override
|
||||
Future<void> setNotifiable(String deviceId, String service,
|
||||
String characteristic, BleInputProperty bleInputProperty) async {}
|
||||
|
||||
Reference in New Issue
Block a user