BluetoothCollector

val BluetoothCollector: <Error class: unknown class>

Pre-configured device collector for gathering Bluetooth hardware capability information.

This collector determines whether the device has Bluetooth hardware support by examining the system's BluetoothManager and BluetoothAdapter availability. This information is useful for device fingerprinting and capability detection.

The collector safely handles devices without Bluetooth support and gracefully manages any exceptions that might occur during Bluetooth system service access.

Detection Logic:

  • Accesses the system BluetoothManager service

  • Checks if a BluetoothAdapter is available

  • Returns true if adapter exists (indicating Bluetooth hardware support)

  • Returns false if no adapter or if any exception occurs

Usage Example:

val bluetoothInfo = BluetoothCollector.collect()
if (bluetoothInfo.supported) {
// Device has Bluetooth capability
enableBluetoothFeatures()
}

Integration with Device Profile:

val collectors = listOf(BluetoothCollector, /* other collectors */)
val deviceProfile = collectors.collect()

The collector is implemented as a lazy-initialized singleton for optimal performance and consistent results across the application lifecycle.

See also