MockCentralManager

A mock central manager implementation for Android that can mock a real Central Manager.

Use simulatePeripherals to set up mock peripherals.

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)
abstract suspend fun connect(peripheral: Peripheral, options: CentralManager.ConnectionOptions)
Link copied to clipboard
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>
Link copied to clipboard
abstract fun simulatePeripherals(peripherals: List<PeripheralSpec<String>>)
Link copied to clipboard
abstract fun simulatePowerOff()
Link copied to clipboard
abstract fun simulatePowerOn()
Link copied to clipboard
abstract fun tearDownSimulation()