filters

expect fun filters(builderAction: FiltersBuilder.() -> Unit)

Filters Advertisements during a scan. If predicates are non-empty, then only Advertisements that match at least one of the predicates are emitted during a scan.


expect var filters: List<Filter>?

Deprecated (with error)

Use filters(FiltersBuilder.() -> Unit)

Replace with

filters { }

Filters Advertisements during a scan: If filters is null or empty, then no filtering is performed (i.e. all Advertisements are emitted during a scan). If filters are provided (i.e. filters is a list of at least one Filter), then only Advertisements that match at least one Filter are emitted during a scan.

actual fun filters(builderAction: FiltersBuilder.() -> Unit)

Filters Advertisements during a scan. If predicates are non-empty, then only Advertisements that match at least one of the predicates are emitted during a scan.

Filtering on Service Data is not supported because it is not implemented: https://github.com/WebBluetoothCG/web-bluetooth/blob/main/implementation-status.md

Filtering on Manufacturer Data is supported and a good explanation can be found here: https://github.com/WebBluetoothCG/web-bluetooth/blob/main/data-filters-explainer.md


actual var filters: List<Filter>?

Deprecated (with error)

Use filters(FiltersBuilder.() -> Unit)

Replace with

filters { }
actual fun filters(builderAction: FiltersBuilder.() -> Unit)

actual var filters: List<Filter>?

Deprecated (with error)

Use filters(FiltersBuilder.() -> Unit)

Replace with

filters { }