@Deprecated
public class ConnectionSharingAdapter
extends java.lang.Object
Example use:
UUID characteristicUUID = UUID.fromString("70a5bfcc-a0ec-4091-985e-d5506a31c921");
Observable connectionObservable = bleDevice
.establishConnection(this, false)
.compose(new ConnectionSharingAdapter());
connectionObservable
.flatMap(rxBleConnection -> rxBleConnection.setupNotification(characteristicUUID))
.flatMap(notificationObservable -> notificationObservable)
.subscribe(bytes -> {
// React on characteristic changes
});
connectionObservable
.flatMap(rxBleConnection -> rxBleConnection.writeCharacteristic(characteristicUUID, "some text".getBytes()))
.subscribe();
BleAlreadyConnectedException| Constructor and Description |
|---|
ConnectionSharingAdapter()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
<any> |
apply(<any> upstream)
Deprecated.
|