public class RxBleDeviceServices
extends java.lang.Object
| Constructor and Description |
|---|
RxBleDeviceServices(java.util.List<android.bluetooth.BluetoothGattService> bluetoothGattServices) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<android.bluetooth.BluetoothGattService> |
getBluetoothGattServices()
List of all GATT services supported by the device
|
<any> |
getCharacteristic(java.util.UUID characteristicUuid)
Creates an observable emitting
BluetoothGattCharacteristic with matching characteristic UUID. |
<any> |
getCharacteristic(java.util.UUID serviceUuid,
java.util.UUID characteristicUuid)
Creates an observable emitting
BluetoothGattCharacteristics with matching service UUID and characteristic UUID. |
<any> |
getDescriptor(java.util.UUID characteristicUuid,
java.util.UUID descriptorUuid) |
<any> |
getDescriptor(java.util.UUID serviceUuid,
java.util.UUID characteristicUuid,
java.util.UUID descriptorUuid) |
<any> |
getService(java.util.UUID serviceUuid)
Creates an observable emitting
BluetoothGattService with matching service UUID. |
public RxBleDeviceServices(java.util.List<android.bluetooth.BluetoothGattService> bluetoothGattServices)
public java.util.List<android.bluetooth.BluetoothGattService> getBluetoothGattServices()
public <any> getService(java.util.UUID serviceUuid)
BluetoothGattService with matching service UUID.
The observable completes after first emission.serviceUuid - Service UUID to be foundBleServiceNotFoundException - if service with given UUID hasn't been found.public <any> getCharacteristic(java.util.UUID characteristicUuid)
BluetoothGattCharacteristic with matching characteristic UUID.
The observable completes after first emission.
The main assumption is that characteristics have unique UUID across all services as there is a traversal done across all of them. For an alternative see RxBleDeviceServices#getCharacteristic(UUID)
characteristicUuid - Characteristic UUID to be foundBleCharacteristicNotFoundException - if characteristic with given UUID hasn't been found.public <any> getCharacteristic(java.util.UUID serviceUuid,
java.util.UUID characteristicUuid)
BluetoothGattCharacteristics with matching service UUID and characteristic UUID.
The observable completes after first emission.characteristicUuid - Characteristic UUID to be foundserviceUuid - Service UUID to search inBleCharacteristicNotFoundException - if characteristic with given UUID hasn't been found.getCharacteristic(UUID)public <any> getDescriptor(java.util.UUID characteristicUuid,
java.util.UUID descriptorUuid)
public <any> getDescriptor(java.util.UUID serviceUuid,
java.util.UUID characteristicUuid,
java.util.UUID descriptorUuid)