Package-level declarations

Types

Link copied to clipboard
abstract class Attribute<ReadAction : DeviceAction.Read, WriteAction : DeviceAction.Write>(initialValue: ByteArray? = null, emitNewAction: (DeviceConnectionManager.Event.AddAction) -> Unit, parentLogTag: String, logger: Logger) : Flow<ByteArray?>

A bluetooth attribute conforming to the Attribute Protocol in Bluetooth Low Energy

Link copied to clipboard

Builder class for creating a Bluetooth object.

Link copied to clipboard
class Bluetooth(coroutineContext: CoroutineContext, scanningStateRepoBuilder: (CoroutineContext) -> ScanningStateFlowRepo) : BluetoothService, CoroutineScope
Link copied to clipboard

A default implementation of BaseBluetoothBuilder

A default implementation of BaseBluetoothBuilder

actual class BluetoothBuilder

A default implementation of BaseBluetoothBuilder

A default implementation of BaseBluetoothBuilder

A default implementation of BaseBluetoothBuilder

Link copied to clipboard
actual interface BluetoothMonitor : ServiceMonitor

A ServiceMonitor that monitors whether Bluetooth is enabled

expect interface BluetoothMonitor : ServiceMonitor

A ServiceMonitor that monitors whether Bluetooth is enabled

actual interface BluetoothMonitor

A ServiceMonitor that monitors whether Bluetooth is enabled

actual interface BluetoothMonitor : ServiceMonitor

A ServiceMonitor that monitors whether Bluetooth is enabled

actual interface BluetoothMonitor : ServiceMonitor

A ServiceMonitor that monitors whether Bluetooth is enabled

Link copied to clipboard

A service for managing Bluetooth Device

Link copied to clipboard

An Attribute of a Bluetooth Characteristic

Link copied to clipboard

The properties associated with a Bluetooth Characteristic

Link copied to clipboard
expect interface CharacteristicWrapper

Accessor to the platform level Bluetooth characteristic

actual interface CharacteristicWrapper

Accessor to a CBCharacteristic

actual interface CharacteristicWrapper

JavaScript accessor to a Bluetooth characteristic. Not Actually implemented

actual interface CharacteristicWrapper

Java accessor to a Bluetooth characteristic. Not Actually implemented

Link copied to clipboard
class DefaultCharacteristicWrapper(characteristic: <Error class: unknown class>) : CharacteristicWrapper

Default implementation of CharacteristicWrapper

Link copied to clipboard
class DefaultDescriptorWrapper(descriptor: <Error class: unknown class>) : DescriptorWrapper

Default implementation of DescriptorWrapper

Link copied to clipboard

Default implementation of ServiceWrapper

Link copied to clipboard
class DefaultServiceWrapper(service: <Error class: unknown class>) : ServiceWrapper

Default implementation of ServiceWrapper

Link copied to clipboard
open class Descriptor(val wrapper: DescriptorWrapper, initialValue: ByteArray? = null, emitNewAction: (DeviceConnectionManager.Event.AddAction) -> Unit, parentLogTag: String, logger: Logger) : Attribute<DeviceAction.Read.Descriptor, DeviceAction.Write.Descriptor>

An Attribute of a Bluetooth Descriptor

Link copied to clipboard
actual interface DescriptorWrapper
expect interface DescriptorWrapper

Accessor to the platform level Bluetooth Descriptor

actual interface DescriptorWrapper

Accessor to a CBDescriptor

actual interface DescriptorWrapper

JavaScript accessor to a Bluetooth descriptor. Not Actually implemented

actual interface DescriptorWrapper

Java accessor to a Bluetooth descriptor. Not Actually implemented

Link copied to clipboard
typealias MTU = Int

The Maximum Transmission Unit (MTU)

Link copied to clipboard
typealias RSSI = Int

The Received signal strength indication (RSSI)

Link copied to clipboard
class Service(service: ServiceWrapper, emitNewAction: (DeviceConnectionManager.Event.AddAction) -> Unit, parentLogTag: String, logger: Logger)

A Bluetooth Service

Link copied to clipboard
actual interface ServiceWrapper

Accessor to a BluetoothGattService

expect interface ServiceWrapper

Accessor to the platform level Bluetooth service

actual interface ServiceWrapper

Accessor to a CBService

actual interface ServiceWrapper

JavaScript accessor to a Bluetooth service. Not Actually implemented

actual interface ServiceWrapper

Java accessor to a Bluetooth service. Not Actually implemented

Link copied to clipboard
typealias TxPower = Int

The transmission power level in dBm

Link copied to clipboard
actual typealias UUID = java.util.UUID

The Unique Identifier of a Bluetooth property

expect class UUID

The Unique Identifier of a Bluetooth property

actual typealias UUID = <Error class: unknown class>

The Unique Identifier of a Bluetooth property

actual data class UUID

The Unique Identifier of a Bluetooth property

actual data class UUID

The Unique Identifier of a Bluetooth property

Link copied to clipboard
sealed class UUIDException : Exception

An Exception dealing with issues to the Unique identifier

Link copied to clipboard
actual typealias Value = ByteArray

The value of a bluetooth attribute

expect class Value

The value of a platform specific bluetooth attribute

actual typealias Value = <Error class: unknown class>

The value of a bluetooth attribute

actual typealias Value = ByteArray

The JavaScript value of a bluetooth attribute

actual typealias Value = ByteArray

The Java value of a bluetooth attribute

Properties

Link copied to clipboard
expect val Value.asBytes: ByteArray

Gets the ByteArray value of a Value

Link copied to clipboard
expect val UUID.uuidString: String

The string representation of a UUID

actual val UUID.uuidString: String

The string representation of a UUID

actual val UUID.uuidString: String

The string representation of a UUID

Functions

Link copied to clipboard

Gets the (Flow of) BaseAdvertisementData from a Flow of Device

Link copied to clipboard

Gets a (Flow of) the list Characteristic associated with the Service in a Flow

Link copied to clipboard
suspend fun Flow<Device?>.connect(reconnectionSettings: ConnectionSettings.ReconnectionSettings? = null)

Attempts to connect to the Device from a Flow of Device When this method completes, the devices should be in a ConnectableDeviceState.Connected state

Link copied to clipboard

Checks whether CharacteristicWrapper.properties contains any properties in property

Link copied to clipboard

Gets a (Flow of) the list Descriptor associated with the Characteristic in a Flow

Link copied to clipboard
suspend fun Flow<Device?>.disconnect()

Attempts to disconnect to the Device from a Flow of Device When this method completes, the devices should be in a ConnectableDeviceState.Disconnected state

Link copied to clipboard
fun Flow<Device?>.distance(environmentalFactor: Double = 2.0, averageOver: Int = 5): Flow<Double>

Gets the (Flow of) the distance in meters between the scanner and a Flow of Device. To get a more stable result, this method will average the distance over the last averageOver results.

Link copied to clipboard

Gets a (Flow of) AttributeType of a given UUID from a Flow of a list of AttributeType

@JvmName(name = "getService")
operator fun Flow<List<Service>>.get(uuid: UUID): Flow<Service?>

Gets a (Flow of) Service of a given UUID from a Flow of a list of Service

operator fun Flow<List<Device>>.get(identifier: Identifier): Flow<Device?>

Gets a (Flow of) Device with a given Identifier from a Flow of a list of Device.

Link copied to clipboard
fun Flow<Device?>.info(): Flow<DeviceInfo>

Gets the (Flow of) DeviceInfo from a Flow of Device

Link copied to clipboard
fun Flow<Device?>.mtu(): Flow<MTU?>

Gets the (Flow of) the MTU from a Flow of Device

Link copied to clipboard
suspend fun Flow<Device?>.pair()

Pairs a (Flow of) Device by waiting for it to become connected and calling [ConnectableDeviceState.Connected.pair]

Link copied to clipboard
actual fun randomUUID(): UUID

Gets a random UUID

expect fun randomUUID(): UUID

Gets a random UUID

actual fun randomUUID(): UUID

Gets a random UUID

actual fun randomUUID(): UUID

Gets a random UUID

actual fun randomUUID(): UUID

Gets a random UUID

Link copied to clipboard
suspend fun Flow<Device?>.requestMtu(mtu: MTU): Boolean

Attempts to request a MTU size for the Device from a Flow of Device When this method completes, the devices should have had ConnectableDeviceState.Connected.requestMtu called

Link copied to clipboard
fun Flow<Device?>.rssi(): Flow<RSSI>

Gets the (Flow of) the RSSI value from a Flow of Device

Link copied to clipboard
fun Flow<Device?>.services(): Flow<List<Service>>

Gets a (Flow of) the list of Service associated with the Device in a Flow This will automatically discover services if the device is in a ConnectableDeviceState.Connected.NoServices state.

Link copied to clipboard
fun Flow<Device?>.state(): Flow<DeviceState>

Gets a (Flow of) DeviceState from a Flow or Device

Link copied to clipboard
suspend fun Flow<Device?>.unpair()

Pairs a (Flow of) Device by calling [ConnectableDeviceState.unpair] on the first ConnectableDeviceState

Link copied to clipboard
suspend fun Flow<Device?>.updateRssi()

Attempts to request an update to the RSSI of the Device from a Flow of Device When this method completes, the devices should have had ConnectableDeviceState.Connected.readRssi called

Link copied to clipboard
fun uuidFrom(uuidString: String): UUID

Gets the UUID from a given string

Link copied to clipboard