Skip to content

Commit 4bbd856

Browse files
authoredJul 4, 2018
Fix sample: RSSI
Closes dariuszseweryn#454
1 parent cdfad7c commit 4bbd856

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎sample/src/main/java/com/polidea/rxandroidble2/sample/example5_rssi_periodic/RssiPeriodicExampleActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public void onConnectToggleClick() {
4242
} else {
4343
connectionDisposable = bleDevice.establishConnection(false)
4444
.compose(bindUntilEvent(PAUSE))
45-
.observeOn(AndroidSchedulers.mainThread())
4645
.doFinally(this::clearSubscription)
4746
.flatMap(rxBleConnection -> // Set desired interval.
4847
Observable.interval(2, SECONDS).flatMapSingle(sequence -> rxBleConnection.readRssi()))
48+
.observeOn(AndroidSchedulers.mainThread())
4949
.subscribe(this::updateRssi, this::onConnectionFailure);
5050
}
5151
}

0 commit comments

Comments
 (0)