From 04384dd096d9197e26120ca3c816b82cf85949f5 Mon Sep 17 00:00:00 2001 From: Eric Pietrowicz Date: Tue, 14 Jun 2022 10:03:29 -0500 Subject: [PATCH 1/2] unofficial example app proposal (#547) * Add another unofficial example app --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b8572ac2..9c0988a8 100644 --- a/README.md +++ b/README.md @@ -251,4 +251,5 @@ This will prevent issues like [#147](https://github.com/PhilipsHue/flutter_react #### Unofficial example apps -Example implementation UART over BLE:[link](https://github.com/wolfc01/flutter_reactive_ble_uart_example) \ No newline at end of file +- Example implementation UART over BLE:[link](https://github.com/wolfc01/flutter_reactive_ble_uart_example) +- Example implementation subscription to characteristic using StreamProvider: [link](https://github.com/ubiqueIoT/flutter-reactive-ble-example) From 4b5ed35fef136569c1efa56aa096919c839b9101 Mon Sep 17 00:00:00 2001 From: Daniel Stuart Date: Thu, 28 Jul 2022 10:27:40 -0300 Subject: [PATCH 2/2] Enable extended advertising on android (#594) RxAndroidBle 1.16.0 now supports enabling extended advertising (https://github.com/dariuszseweryn/RxAndroidBle/commit/4371b7832c1aaf328223f831d92b463dca039e85) flutter_reactive_ble already supports extended advertising with iOS, so no changes are needed. --- packages/reactive_ble_mobile/android/build.gradle | 2 +- .../com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/reactive_ble_mobile/android/build.gradle b/packages/reactive_ble_mobile/android/build.gradle index d833e311..ada934a7 100644 --- a/packages/reactive_ble_mobile/android/build.gradle +++ b/packages/reactive_ble_mobile/android/build.gradle @@ -95,7 +95,7 @@ protobuf { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.polidea.rxandroidble2:rxandroidble:1.13.0' + implementation 'com.polidea.rxandroidble2:rxandroidble:1.16.0' implementation 'com.google.protobuf:protobuf-javalite:3.18.1' implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0' implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' diff --git a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt index bf4ddb8b..5cdea0df 100644 --- a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt +++ b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt @@ -75,6 +75,7 @@ open class ReactiveBleClient(private val context: Context) : BleClient { return rxBleClient.scanBleDevices( ScanSettings.Builder() .setScanMode(scanMode.toScanSettings()) + .setLegacy(false) .setCallbackType(ScanSettings.CALLBACK_TYPE_ALL_MATCHES) .setShouldCheckLocationServicesState(requireLocationServicesEnabled) .build(),