I'm new to Rx programming. I'm now trying to use RxAndroidBle
to discover BLE devices' services and read some characteristics from the device.
I can use
device.establishConnection(false)
.flatMap(rxBleConnection -> rxBleConnection.discoverServices());
to find device services
and use
device.establishConnection(false)
.flatMap(rxBleConnection -> rxBleConnection.readCharacteristic(characteristicUUID));
to read wanted characteristic
But I'd like to know if it is possible to combine these two tasks together? If possible, how can I do it?
Many thanks for your tips and help!