RxFitbitGatt / com.fitbit.bluetooth.fbgatt.rx / com.fitbit.bluetooth.fbgatt.GattConnection

Extensions for com.fitbit.bluetooth.fbgatt.GattConnection

getRemoteGattServiceMaybe

fun GattConnection.getRemoteGattServiceMaybe(uuid: UUID): Maybe<BluetoothGattService>

Reactive extension function to return BluetoothGattService for given service uuid

getRemoteGattServiceSingle

fun GattConnection.getRemoteGattServiceSingle(uuid: UUID): Single<BluetoothGattService>

Reactive extension function to return BluetoothGattService for given service uuid

resetGattStateIfNecessary

fun GattConnection.resetGattStateIfNecessary(t: Throwable, stateSetter: GattClientConnectionStateSetter = GattClientConnectionStateSetter()): Completable

Extension function to reset Gatt state to GattState.IDLE on GattTransactionException