RxFitbitGatt / com.fitbit.bluetooth.fbgatt.rx / com.fitbit.bluetooth.fbgatt.FitbitGatt / getGattConnection

getGattConnection

fun FitbitGatt.getGattConnection(bluetoothAddress: String): Maybe<GattConnection>

Reactive extension to get GattConnection for given bluetoothAddress.

If BT is off this method will return NULL, else it will return a known connection. If there is no known connection bitgatt will create a new GattConnection instance for this peripheral

This method could return GattConnection even if it has been previously discovered or not, so no assumption should be made about connection state. to check connection state refer GattConnection.state