apidocs / com.nimmsta.core.android.bluetooth / DevicePairingManager / pairAsync

pairAsync

fun pairAsync(device: BluetoothDeviceMacAddress, startedPairing: ((Unit) -> Unit)? = null): Task<Unit>

Pairs the bluetooth device with the given address asynchronously. Will unpair first if previous pair was not successful. Will remember that the device was paired by this application.

Exceptions

BluetoothException - if it didn't work out

Return
Task to wait for completion