I'm quite new in RxJava
. I try now RxAndroidBle and compare it with Android API implementation for BLE. My peripheral sends a lot of notifications
at once (about 30kB in 512b chunks). In Rx it takes about 10-12 seconds to receive them all.
When I try with Android API it is about 2-3 second.
In my RxAndroidBle implementation I do as it is proposed in the example app:
connectionObservable
.flatMap(rxBleConnection -> rxBleConnection.setupNotification(UUID.fromString(mCharacteristicUUID)))
.doOnNext(notificationObservable -> runOnUiThread(this::notificationHasBeenSetUp))
.flatMap(notificationObservable -> notificationObservable)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
this::onNotificationReceived,
this::onNotificationSetupFailure
);
Is there any way to make it faster?