Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
IvBaranov committed Nov 8, 2015
1 parent 532df70 commit 1c8d575
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,27 @@ BluetoothAdapter.STATE_ON
BluetoothAdapter.STATE_TURNING_OFF
```

##### Observing scan mode

```java
rxBluetooth.observeScanMode(this)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.filter(Action.isEqualTo(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE))
.subscribe(new Action1<Integer>() {
@Override public void call(Integer integer) {
//
}
});
```

You can observe single or multiple scan modes:
```java
BluetoothAdapter.SCAN_MODE_NONE
BluetoothAdapter.SCAN_MODE_CONNECTABLE
BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE
```

Download
--------
```groovy
Expand Down

0 comments on commit 1c8d575

Please sign in to comment.