RxFitbitGatt / com.fitbit.bluetooth.fbgatt.rx.client / BitGattPeer / setupNotifications

setupNotifications

fun setupNotifications(characteristic: BluetoothGattCharacteristic, subscribe: Boolean, isIndication: Boolean = false): Single<BluetoothGattCharacteristic>

Combined operation to set up notifications on a characteristic (enables notifications + writes to descriptor This assumes we are connected to the peer.

Parameters

characteristic - The BluetoothGattCharacteristic on which to enable notifications.

subscribe - true/false, whether we are subscribing from the characteristic or unsubscribing

isIndication - true/false, whether the notification type is indication or notification

Return
A Single containing the BluetoothGattCharacteristic on which notifications were setup/disabled