BaseScanner
An abstract implementation for Scanner
Parameters
the Settings to configure this scanner
the CoroutineScope this scanner runs on
the CoroutineDispatcher to which scanning should be dispatched. It is recommended to make this a dispatcher that can handle high frequency of events
Inheritors
Constructors
Types
Builder for creating a BaseScanner
Settings to configure a BaseScanner
Properties
The Flow of all the ConnectionEvent detected by the scanner
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 Event detected by the scanner
Indicates whether the system supports Bluetooth scanning
Functions
Checks whether the Bluetooth service is currently enabled
Attempts to request the user to enable Bluetooth
Starts scanning for devices. This will result in Event.DeviceDiscovered or Event.FailedScanning
Starts scanning for changes to the Bluetooth service being enabled This will result in Event.BluetoothEnabled or Event.BluetoothDisabled on the events flow
Starts scanning for changes to permissions related to Bluetooth. This will result in Event.PermissionChanged on the events flow.
Stops scanning for changes to the Bluetooth service being enabled
Stops scanning for changes to permissions related to Bluetooth.
Stops scanning for devices