-
public class RxBleDeviceServicesService discovery result containing list of services and characteristics within the services.
-
-
Field Summary
Fields Modifier and Type Field Description final List<BluetoothGattService>bluetoothGattServices
-
Constructor Summary
Constructors Constructor Description RxBleDeviceServices(List<BluetoothGattService> bluetoothGattServices)
-
Method Summary
Modifier and Type Method Description List<BluetoothGattService>getBluetoothGattServices()List of all GATT services supported by the device Single<BluetoothGattService>getService(@NonNull() UUID serviceUuid)Creates an observable emitting BluetoothGattService with matching service UUID.The observable completes after first emission. Single<BluetoothGattCharacteristic>getCharacteristic(@NonNull() UUID characteristicUuid)Creates an observable emitting BluetoothGattCharacteristic with matching characteristic UUID.The observable completes after first emission. Single<BluetoothGattCharacteristic>getCharacteristic(@NonNull() UUID serviceUuid, @NonNull() UUID characteristicUuid)Creates an observable emitting BluetoothGattCharacteristics with matching service UUID and characteristic UUID.The observable completes after first emission. Single<BluetoothGattDescriptor>getDescriptor(UUID characteristicUuid, UUID descriptorUuid)Single<BluetoothGattDescriptor>getDescriptor(UUID serviceUuid, UUID characteristicUuid, UUID descriptorUuid)-
-
Constructor Detail
-
RxBleDeviceServices
RxBleDeviceServices(List<BluetoothGattService> bluetoothGattServices)
-
-
Method Detail
-
getBluetoothGattServices
List<BluetoothGattService> getBluetoothGattServices()
List of all GATT services supported by the device
-
getService
Single<BluetoothGattService> getService(@NonNull() UUID serviceUuid)
Creates an observable emitting BluetoothGattService with matching service UUID.The observable completes after first emission.
- Parameters:
serviceUuid- Service UUID to be found
-
getCharacteristic
Single<BluetoothGattCharacteristic> getCharacteristic(@NonNull() UUID characteristicUuid)
Creates an observable emitting 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 doneacross all of them. For an alternative see RxBleDeviceServices#getCharacteristic(UUID)
- Parameters:
characteristicUuid- Characteristic UUID to be found
-
getCharacteristic
Single<BluetoothGattCharacteristic> getCharacteristic(@NonNull() UUID serviceUuid, @NonNull() UUID characteristicUuid)
Creates an observable emitting BluetoothGattCharacteristics with matching service UUID and characteristic UUID.The observable completes after first emission.
- Parameters:
serviceUuid- Service UUID to search incharacteristicUuid- Characteristic UUID to be found
-
getDescriptor
Single<BluetoothGattDescriptor> getDescriptor(UUID characteristicUuid, UUID descriptorUuid)
-
getDescriptor
Single<BluetoothGattDescriptor> getDescriptor(UUID serviceUuid, UUID characteristicUuid, UUID descriptorUuid)
-
-
-
-