I am a newer for RxJava, and when i read the demo of rxandroidble library, I am wondering why the first can disconnect the ble.
@OnClick(R.id.connect)
public void onConnectToggleClick() {
bleDevice.establishConnection(false)
.flatMap(RxBleConnection::discoverServices)
.first() // Disconnect automatically after discovery
.compose(bindUntilEvent(PAUSE))
.observeOn(AndroidSchedulers.mainThread())
.doOnUnsubscribe(this::updateUI)
.subscribe(adapter::swapScanResult, this::onConnectionFailure);
updateUI();
}