CentralManager

Android-specific interface of the Central Manager.

This interface extends CentralManager and adds support for bonded devices, connecting using Android-specific connection options, and getting peripherals by their MAC addresses.

Types

Link copied to clipboard
sealed class ConnectionOptions

Android-specific connection options.

Link copied to clipboard
object Factory

Properties

Link copied to clipboard
abstract val state: StateFlow<Manager.State>

Functions

Link copied to clipboard
abstract override fun close()
Link copied to clipboard
open suspend override fun connect(peripheral: Peripheral)

Connects to the given peripheral using default connection options.

abstract suspend fun connect(peripheral: Peripheral, options: CentralManager.ConnectionOptions)

Connects to the given peripheral.

Link copied to clipboard

Returns a list of peripherals for which the system has bond information.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun monitor(timeout: Duration, filter: ConjunctionFilterScope.() -> Unit): Flow<MonitoringEvent<Peripheral>>
Link copied to clipboard
abstract fun range(peripheral: Peripheral, timeout: Duration): Flow<RangeEvent<Peripheral>>
Link copied to clipboard
abstract fun scan(timeout: Duration, filter: ConjunctionFilterScope.() -> Unit): Flow<ScanResult>