Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
IvBaranov committed Apr 24, 2017
1 parent bfe5965 commit 6e470eb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,28 @@ bluetoothConnection.send("Hello"); // String
bluetoothConnection.send("There".getBytes()); // Array of bytes
```

#### Observe ACL actions
```java
rxBluetooth.observeAclEvent() //
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.computation())
.subscribe(new Action1<AclEvent>() {
@Override public void call(AclEvent aclEvent) {
switch (aclEvent.getAction()) {
case BluetoothDevice.ACTION_ACL_CONNECTED:
//...
break;
case BluetoothDevice.ACTION_ACL_DISCONNECT_REQUESTED:
//...
break;
case BluetoothDevice.ACTION_ACL_DISCONNECTED:
//...
break;
}
}
});
```

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

0 comments on commit 6e470eb

Please sign in to comment.