inner class PairableDevice
Represents one device with its state.
<init> |
Represents one device with its state. PairableDevice(device: BluetoothDevice, wasPaired: Boolean = false) |
device |
val device: BluetoothDevice |
isPaired |
Returns if the current state is considered paired. Paired means the device is known to the app. It does not promise that pairing was in fact successful. For this you should call pairAsync once and wait for result. It will take very little time if device is already paired. var isPaired: Boolean |
handleBondStateChange |
fun handleBondStateChange(bondState: Int, previousBondState: Int): Unit |
log |
Logging fun log(log: String): Unit |
pairAsync |
Pairs a device and waits for completion. fun pairAsync(startedPairing: ((Unit) -> Unit)? = null): Task<Unit> |
unpairAsync |
Unpairs a device. Will wait until unpair actually happened. fun unpairAsync(): Task<Unit> |