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
sealed class MonitoringEvent<P : Peripheral<*, *>>(val peripheral: P)

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
sealed class Profile(requiredServiceUuids: List<Uuid>, optionalServiceUuids: List<Uuid> = emptyList(), val name: String? = null)

A class representing a Bluetooth LE profile.

Link copied to clipboard
sealed class ProfileServices<out T>

The outcome of resolving a profile's services on a peripheral, passed to the block parameter of Peripheral.profile.

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<*, *>>(val peripheral: P)

An event indicating ranging events for the peripheral.

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
sealed class RemoteServices

State of the service discovery process.

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

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

Functions

Link copied to clipboard
fun <ID : Any, 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.