Package-level declarations

Types

Link copied to clipboard
interface Advertisement
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
object Bluetooth
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface Characteristic
Link copied to clipboard
Link copied to clipboard
typealias CoreBluetoothScanner = <Error class: unknown class>
Link copied to clipboard
interface Descriptor
Link copied to clipboard

Wrapper around platform specific Bluetooth LE characteristic. Holds a strong reference to underlying characteristic.

Wrapper around platform specific Bluetooth LE characteristic. Holds a strong reference to underlying characteristic.

Link copied to clipboard

Wrapper around platform specific Bluetooth LE descriptor. Holds a strong reference to underlying descriptor.

actual data class DiscoveredDescriptor : Descriptor

Wrapper around platform specific Bluetooth LE descriptor. Holds a strong reference to underlying descriptor.

Link copied to clipboard
expect class DiscoveredService : Service

Wrapper around platform specific Bluetooth LE service. Holds a strong reference to underlying service.

actual data class DiscoveredService : Service
actual class DiscoveredService : Service

Wrapper around platform specific Bluetooth LE service. Holds a strong reference to underlying service.

Link copied to clipboard

Marks API that is experimental and/or likely to change.

Link copied to clipboard
sealed class Filter

All Filters are supported on all platforms, except for Filter.Address, which is only supported on Android.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class FilterSet(val services: List<Filter.Service> = emptyList(), val name: Filter.Name.Exact? = null, val namePrefix: Filter.Name.Prefix? = null, val manufacturerData: List<Filter.ManufacturerData> = emptyList())

Filtering on Service Data is not supported because it is not implemented: https://github.com/WebBluetoothCG/web-bluetooth/blob/main/implementation-status.md

Link copied to clipboard

Thrown when underlying BluetoothGatt method call returns false. This can occur under the following conditions:

Link copied to clipboard
class GattStatusException(message: String? = null, cause: Throwable? = null) : IOException
Link copied to clipboard

Thrown when underlying BluetoothGatt write operation call fails.

Link copied to clipboard
actual typealias Identifier = String
actual typealias Identifier = Uuid
expect class Identifier
actual typealias Identifier = String
actual typealias Identifier = String
Link copied to clipboard

An Error that signifies that an unexpected condition or state was encountered in the Kable internals.

Link copied to clipboard
typealias IOException = kotlinx.io.IOException
Link copied to clipboard
Link copied to clipboard
object Kable
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class LazyDescriptor(val serviceUuid: Uuid, val characteristicUuid: Uuid, val descriptorUuid: Uuid) : Descriptor
Link copied to clipboard
class ManufacturerData(val code: Int, val data: ByteArray)
Link copied to clipboard
open class NotConnectedException(message: String? = null, cause: Throwable? = null) : IOException
Link copied to clipboard
Link copied to clipboard
annotation class ObsoleteKableApi

Marks declarations that are obsolete in Kable API, which means that the design of the corresponding declarations has known flaws/drawbacks and they will be redesigned or replaced in the future.

Link copied to clipboard

A ThreadingStrategy that creates "threads" when acquired and immediately shuts down when released.

Link copied to clipboard
data class Options
Link copied to clipboard
Link copied to clipboard
interface Peripheral : CoroutineScope
Link copied to clipboard
expect class PeripheralBuilder
actual class PeripheralBuilder
actual class PeripheralBuilder
Link copied to clipboard
enum Phy : Enum<Phy>

Preferred Physical Layer (PHY) for connections to remote LE devices.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class PooledThreadingStrategy(scope: CoroutineScope = GlobalScope, evictAfter: Duration = 1.minutes) : ThreadingStrategy

A ThreadingStrategy that pools unused "threads" until evictAfter time has elapsed.

Link copied to clipboard
Link copied to clipboard
expect enum Reason : Enum<Reason>
actual enum Reason : Enum<Reason>
actual enum Reason : Enum<Reason>
Link copied to clipboard
interface Scanner<out T : Advertisement>
Link copied to clipboard
expect class ScannerBuilder
actual class ScannerBuilder
actual class ScannerBuilder
Link copied to clipboard
interface Service
Link copied to clipboard
Link copied to clipboard
sealed class State
Link copied to clipboard
sealed class Threading
Link copied to clipboard
Link copied to clipboard

Preferred transport for GATT connections to remote dual-mode devices.

Link copied to clipboard
class UnmetRequirementException : IOException
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun characteristicOf(service: String, characteristic: String): Characteristic
Link copied to clipboard
fun descriptorOf(service: String, characteristic: String, descriptor: String): Descriptor
Link copied to clipboard
fun Options(builder: OptionsBuilder.() -> Unit): Options

https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/requestDevice

fun Options(filters: List<Filter>? = null, filterSets: List<FilterSet>? = null, optionalServices: List<Uuid>? = null): Options
Link copied to clipboard
fun Peripheral(bluetoothDevice: BluetoothDevice, builderAction: PeripheralBuilderAction = {}): Peripheral
fun Peripheral(identifier: Identifier, builderAction: PeripheralBuilderAction = {}): Peripheral
fun Peripheral(identifier: Identifier, builderAction: <Error class: unknown class> = {}): CoreBluetoothPeripheral
fun Peripheral(cbPeripheral: CBPeripheral, builderAction: <Error class: unknown class> = {}): CoreBluetoothPeripheral
expect fun Peripheral(advertisement: Advertisement, builderAction: PeripheralBuilderAction = {}): Peripheral
actual fun Peripheral(advertisement: Advertisement, builderAction: PeripheralBuilderAction): Peripheral
actual fun Peripheral(advertisement: Advertisement, builderAction: PeripheralBuilderAction): Peripheral
Link copied to clipboard
fun CoroutineScope.peripheral(bluetoothDevice: BluetoothDevice, builderAction: PeripheralBuilderAction = {}): Peripheral
fun CoroutineScope.peripheral(identifier: Identifier, builderAction: PeripheralBuilderAction = {}): Peripheral
fun <Error class: unknown class>.peripheral(identifier: Identifier, builderAction: <Error class: unknown class> = {}): <Error class: unknown class>
fun <Error class: unknown class>.peripheral(cbPeripheral: CBPeripheral, builderAction: <Error class: unknown class>): CoreBluetoothPeripheral
expect fun CoroutineScope.peripheral(advertisement: Advertisement, builderAction: PeripheralBuilderAction = {}): Peripheral
actual fun CoroutineScope.peripheral(advertisement: Advertisement, builderAction: PeripheralBuilderAction): Peripheral
actual fun CoroutineScope.peripheral(advertisement: Advertisement, builderAction: PeripheralBuilderAction): Peripheral
Link copied to clipboard
suspend fun requestPeripheral(options: Options, builderAction: PeripheralBuilderAction = {}): Peripheral?

Obtains a nearby Peripheral via device picker. Returns null if dialog is cancelled (e.g. user dismissed dialog by clicking outside of dialog or clicking cancel button).

Link copied to clipboard
fun Scanner(builderAction: ScannerBuilder.() -> Unit = {}): PlatformScanner
Link copied to clipboard
Link copied to clipboard

Creates Threading that can be used for Bluetooth communication. The returned Threading is returned in a started state and must be shutdown when no longer needed.

Link copied to clipboard