-
Notifications
You must be signed in to change notification settings - Fork 95
Observing devices
Ivan Baranov edited this page Dec 7, 2015
·
5 revisions
To start discovering devices, call rxBluetooth.startDiscovery()
. The process is asynchronous and the method will immediately return with a boolean indicating whether discovery has successfully started.
Getting devices found while discovering:
rxBluetooth.observeDevices()
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.computation())
.subscribe(new Action1<BluetoothDevice>() {
@Override public void call(BluetoothDevice bluetoothDevice) {
//
}
});