DefaultScanner

A default implementation of BaseScanner

Parameters

applicationContext

the Context in which Bluetooth should run

bluetoothScanner

the BluetoothLeScannerCompat to use for scanning

bluetoothAdapter

the BluetoothAdapter to use to access Bluetooth

scanSettings

the ScanSettings to apply to the scanner

settings

the BaseScanner.Settings to configure this scanner

coroutineScope

the CoroutineScope this scanner runs on

scanningDispatcher

the CoroutineDispatcher to which scanning should be dispatched. It is recommended to make this a dispatcher that can handle high frequency of events

A default implementation of BaseScanner

actual class DefaultScanner

A default implementation of BaseScanner

Parameters

scanSettings

the ScanSettings to configure this scanner

settings

the BaseScanner.Settings to configure this scanner

coroutineScope

the CoroutineScope this scanner runs on

scanningDispatcher

the CoroutineDispatcher to which scanning should be dispatched. It is recommended to make this a dispatcher that can handle high frequency of events

Default implementation of BaseScanner

Parameters

settings

the Settings to configure this scanner

coroutineScope

the CoroutineScope this scanner runs on

scanningDispatcher

the CoroutineDispatcher to which scanning should be dispatched. It is recommended to make this a dispatcher that can handle high frequency of events

Default implementation of BaseScanner

Parameters

settings

the Settings to configure this scanner

coroutineScope

the CoroutineScope this scanner runs on

scanningDispatcher

the CoroutineDispatcher to which scanning should be dispatched. It is recommended to make this a dispatcher that can handle high frequency of events

Constructors

Link copied to clipboard
constructor(settings: BaseScanner.Settings, coroutineScope: CoroutineScope, scanningDispatcher: CoroutineDispatcher = com.splendo.kaluga.bluetooth.scanner.scanningDispatcher)
constructor(settings: BaseScanner.Settings, coroutineScope: CoroutineScope, scanningDispatcher: CoroutineDispatcher = com.splendo.kaluga.bluetooth.scanner.scanningDispatcher)

Types

Link copied to clipboard
class Builder(applicationContext: Context = ApplicationHolder.applicationContext, bluetoothScanner: BluetoothLeScannerCompat = BluetoothLeScannerCompat.getScanner(), bluetoothAdapter: BluetoothAdapter? = (applicationContext.getSystemService(Context.BLUETOOTH_SERVICE) as? BluetoothManager)?.adapter, scanSettings: ScanSettings = defaultScanSettings) : BaseScanner.Builder

Builder for creating a DefaultScanner

class Builder(scanSettings: DefaultScanner.ScanSettings = ScanSettings.defaultScanOptions)

Builder for creating a DefaultScanner

Builder for creating a DefaultScanner

Builder for creating a DefaultScanner

Link copied to clipboard
object Companion
Link copied to clipboard

Settings to configure a DefaultScanner

Properties

Link copied to clipboard
Link copied to clipboard
open override val connectionEvents: Flow<Scanner.ConnectionEvent>

The Flow of all the ConnectionEvent detected by the scanner

open override val connectionEvents: Flow<Scanner.ConnectionEvent>

The Flow of all the ConnectionEvent detected by the scanner

open override val connectionEvents: Flow<Scanner.ConnectionEvent>

The Flow of all the ConnectionEvent detected by the scanner

open override val connectionEvents: Flow<Scanner.ConnectionEvent>

The Flow of all the ConnectionEvent detected by the scanner

coroutineContext
Link copied to clipboard
Link copied to clipboard

The Flow of all the DeviceDiscovered detected by the scanner. These are grouped in a list until collected to account for high volumes of events

The Flow of all the DeviceDiscovered detected by the scanner. These are grouped in a list until collected to account for high volumes of events

The Flow of all the DeviceDiscovered detected by the scanner. These are grouped in a list until collected to account for high volumes of events

The Flow of all the DeviceDiscovered detected by the scanner. These are grouped in a list until collected to account for high volumes of events

Link copied to clipboard
open override val events: Flow<Scanner.Event>

The Flow of all the Event detected by the scanner

open override val events: Flow<Scanner.Event>

The Flow of all the Event detected by the scanner

open override val events: Flow<Scanner.Event>

The Flow of all the Event detected by the scanner

open override val events: Flow<Scanner.Event>

The Flow of all the Event detected by the scanner

Link copied to clipboard
open override val isSupported: Boolean

Indicates whether the system supports Bluetooth scanning

abstract val isSupported: Boolean

Indicates whether the system supports Bluetooth scanning

open val isSupported: Boolean = true
open override val isSupported: Boolean = false

Indicates whether the system supports Bluetooth scanning

open override val isSupported: Boolean = false

Indicates whether the system supports Bluetooth scanning

Functions

Link copied to clipboard
open override fun cancelRetrievingPairedDevices()
open override fun cancelRetrievingPairedDevices()
open override fun cancelRetrievingPairedDevices()
open override fun cancelRetrievingPairedDevices()
Link copied to clipboard
open suspend fun didStartScanning(filter: <Error class: unknown class>)
Link copied to clipboard
open suspend fun didStopScanning()
Link copied to clipboard
open fun generateEnableSensorsActions(): List<<Error class: unknown class>>
Link copied to clipboard
open suspend override fun isHardwareEnabled(): Boolean

Checks whether the Bluetooth service is currently enabled

open suspend override fun isHardwareEnabled(): Boolean

Checks whether the Bluetooth service is currently enabled

open suspend override fun isHardwareEnabled(): Boolean

Checks whether the Bluetooth service is currently enabled

open suspend override fun isHardwareEnabled(): Boolean

Checks whether the Bluetooth service is currently enabled

Link copied to clipboard
open suspend override fun requestEnableHardware()

Attempts to request the user to enable Bluetooth

open suspend override fun requestEnableHardware()

Attempts to request the user to enable Bluetooth

open suspend override fun requestEnableHardware()

Attempts to request the user to enable Bluetooth

open suspend override fun requestEnableHardware()

Attempts to request the user to enable Bluetooth

Link copied to clipboard
open suspend fun retrievePairedDeviceDiscoveredEvents(withServices: <Error class: unknown class>, connectionSettings: <Error class: unknown class>?): List<<Error class: unknown class>>
Link copied to clipboard
open suspend override fun retrievePairedDevices(withServices: Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?)

Retrieves the list of paired Device This will result in Event.PairedDevicesRetrieved on the events flow

open suspend override fun retrievePairedDevices(withServices: Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?)

Retrieves the list of paired Device This will result in Event.PairedDevicesRetrieved on the events flow

open suspend override fun retrievePairedDevices(withServices: Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?)

Retrieves the list of paired Device This will result in Event.PairedDevicesRetrieved on the events flow

open suspend override fun retrievePairedDevices(withServices: Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?)

Retrieves the list of paired Device This will result in Event.PairedDevicesRetrieved on the events flow

Link copied to clipboard
suspend override fun scanForDevices(filter: Filter, connectionSettings: ConnectionSettings?)

Starts scanning for devices. This will result in Event.DeviceDiscovered or Event.FailedScanning

suspend override fun scanForDevices(filter: Filter, connectionSettings: ConnectionSettings?)

Starts scanning for devices. This will result in Event.DeviceDiscovered or Event.FailedScanning

suspend override fun scanForDevices(filter: Filter, connectionSettings: ConnectionSettings?)

Starts scanning for devices. This will result in Event.DeviceDiscovered or Event.FailedScanning

suspend override fun scanForDevices(filter: Filter, connectionSettings: ConnectionSettings?)

Starts scanning for devices. This will result in Event.DeviceDiscovered or Event.FailedScanning

Link copied to clipboard
open suspend override fun startMonitoringHardwareEnabled()

Starts scanning for changes to the Bluetooth service being enabled This will result in Event.BluetoothEnabled or Event.BluetoothDisabled on the events flow

open suspend override fun startMonitoringHardwareEnabled()

Starts scanning for changes to the Bluetooth service being enabled This will result in Event.BluetoothEnabled or Event.BluetoothDisabled on the events flow

open suspend override fun startMonitoringHardwareEnabled()

Starts scanning for changes to the Bluetooth service being enabled This will result in Event.BluetoothEnabled or Event.BluetoothDisabled on the events flow

open suspend override fun startMonitoringHardwareEnabled()

Starts scanning for changes to the Bluetooth service being enabled This will result in Event.BluetoothEnabled or Event.BluetoothDisabled on the events flow

Link copied to clipboard
open suspend override fun startMonitoringPermissions()

Starts scanning for changes to permissions related to Bluetooth. This will result in Event.PermissionChanged on the events flow.

open suspend override fun startMonitoringPermissions()

Starts scanning for changes to permissions related to Bluetooth. This will result in Event.PermissionChanged on the events flow.

open suspend override fun startMonitoringPermissions()

Starts scanning for changes to permissions related to Bluetooth. This will result in Event.PermissionChanged on the events flow.

open suspend override fun startMonitoringPermissions()

Starts scanning for changes to permissions related to Bluetooth. This will result in Event.PermissionChanged on the events flow.

Link copied to clipboard
open suspend override fun stopMonitoringHardwareEnabled()

Stops scanning for changes to the Bluetooth service being enabled

open suspend override fun stopMonitoringHardwareEnabled()

Stops scanning for changes to the Bluetooth service being enabled

open suspend override fun stopMonitoringHardwareEnabled()

Stops scanning for changes to the Bluetooth service being enabled

open suspend override fun stopMonitoringHardwareEnabled()

Stops scanning for changes to the Bluetooth service being enabled

Link copied to clipboard
open suspend override fun stopMonitoringPermissions()

Stops scanning for changes to permissions related to Bluetooth.

open suspend override fun stopMonitoringPermissions()

Stops scanning for changes to permissions related to Bluetooth.

open suspend override fun stopMonitoringPermissions()

Stops scanning for changes to permissions related to Bluetooth.

open suspend override fun stopMonitoringPermissions()

Stops scanning for changes to permissions related to Bluetooth.

Link copied to clipboard
suspend override fun stopScanning()

Stops scanning for devices

suspend override fun stopScanning()

Stops scanning for devices

suspend override fun stopScanning()

Stops scanning for devices

suspend override fun stopScanning()

Stops scanning for devices