scan

@RequiresPermission(allOf = ["android.permission.BLUETOOTH_SCAN", "android.permission.BLUETOOTH_CONNECT"])
fun scan(filters: List<BleScanFilter> = emptyList(), settings: BleScannerSettings = BleScannerSettings()): Flow<BleScanResult>

Starts scanning and emit results in the Flow. Automatically stops scanning when CoroutineScope of the Flow is closed.

Returns MockServerDevice if any mock server has been registered.

Return

Flow which emits scan findings (BleScanResult) in chronological order

Parameters

settings

for scanning configuration