Package-level declarations
Data models for customizing the scanner.
This package provides the data models used by the scanner, along with a set of predefined Filters and SortingOptions. These allow for custom filtering logic based on device names, proximity (RSSI), or service UUIDs, and sorting based on name or signal strength.
Types
Link copied to clipboard
class CustomFilter(@StringRes title: Int, @DrawableRes icon: Int = R.drawable.baseline_check_24, isInitiallySelected: Boolean = false, predicate: (selected: Boolean, result: ScanResult, highestRssi: Int) -> Boolean) : Filter
Custom filter.
Link copied to clipboard
class CustomSorting(@StringRes title: Int, comparator: Comparator<ScannedPeripheral>) : SortingOption
Sort results using a custom comparator.
Link copied to clipboard
Link copied to clipboard
class OnlyWithNames(@StringRes title: Int = R.string.filter_only_with_names, isInitiallySelected: Boolean = false) : Filter
Filter that allows scan results with no empty names.
Link copied to clipboard
data class ScannedPeripheral(val peripheral: Peripheral, var latestScanResult: ScanResult, var highestRssi: Int)
A record containing information about a scanned peripheral.
Link copied to clipboard
Sort results alphabetically by device name.
Link copied to clipboard
Sort results by highest RSSI value.
Link copied to clipboard
Sort results by first found order.
Link copied to clipboard
Link copied to clipboard
class WithServiceUuid(uuid: Uuid, @DrawableRes icon: Int = R.drawable.baseline_check_24, @StringRes title: Int = R.string.filter_with_service_uuid, isInitiallySelected: Boolean = false) : Filter
Filter devices based on a Service UUID.