Skip to content
Ivan Baranov edited this page Jun 21, 2017 · 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 Consumer<BluetoothDevice>() {
      @Override public void accept(@NonNull BluetoothDevice bluetoothDevice) throws Exception {
        //
      }
    }));