Package-level declarations

Common types and interfaces for Bluetooth Low Energy clients.

Types

Link copied to clipboard
interface AdvertisingData

Advertising Data represents the data found in the Advertisement Packet and Scan Response combined.

Link copied to clipboard

A GATT service on a remote connected peripheral device.

Link copied to clipboard

A central manager is responsible for scanning, monitoring and connecting to Bluetooth LE devices.

Link copied to clipboard

Event indicating that the connection state has changed.

Link copied to clipboard
sealed class GattEvent

A base class for all GATT events.

Link copied to clipboard

Event type used by implementations.

Link copied to clipboard
sealed class MonitoringEvent<P : Peripheral<*, *>>

An event indicating that the scanning device entered region of the monitored peripheral.

Link copied to clipboard
abstract class Peripheral<ID : Any, EX : Peripheral.Executor<ID>>(scope: CoroutineScope, impl: EX) : Peer<ID>

Class representing a Bluetooth LE peripheral.

Link copied to clipboard
class PeripheralEnteredRange<P : Peripheral<*, *>>(peripheral: P) : MonitoringEvent<P>

An event indicating that the scanning device entered region of the monitored peripheral.

Link copied to clipboard
class PeripheralLeftRange<P : Peripheral<*, *>>(peripheral: P) : MonitoringEvent<P>

An event indicating that the scanning device left region of the monitored peripheral and no advertising packets were received.

Link copied to clipboard
class ProximityChanged<P : Peripheral<*, *>>(peripheral: P, val previousProximity: ProximityChanged.Proximity, val proximity: ProximityChanged.Proximity) : RangeEvent<P>

An event indicating that the proximity of the peripheral has changed.

Link copied to clipboard
sealed class RangeEvent<P : Peripheral<*, *>>

An event indicating ranging events for the peripheral.

Link copied to clipboard

A scope of reliable write operation.

Link copied to clipboard

A GATT characteristic of a service on a remote connected peripheral device.

Link copied to clipboard

A GATT descriptor of a characteristic on a remote connected peripheral device.

Link copied to clipboard

A GATT service that is included in another service on a remote connected peripheral device.

Link copied to clipboard

A GATT service on a remote connected peripheral device.

Link copied to clipboard
data class RssiRead(val rssi: Int) : GattEvent

Event indicating that the RSSI value has been read.

Link copied to clipboard
interface ScanResult<P : Peripheral<*, *>, AD : AdvertisingData>

A Scan Result represents a single advertisement found during the scan.

Link copied to clipboard

Event indicating that the services have changed.

Link copied to clipboard
data class ServicesDiscovered(val services: List<RemoteService>) : GattEvent

Event indicating that the services have changed.

Functions

Link copied to clipboard
fun <ID, P : Peripheral<ID, *>, SR : ScanResult<P, *>> Flow<SR>.distinctByPeripheral(): Flow<SR>

A flow which emits only one (first found) Scan Result from each discovered peripheral.