Package com.juul.kable

Types

Link copied to clipboard
expect class Advertisement
actual class Advertisement
Link copied to clipboard
class AndroidPeripheral : Peripheral
Link copied to clipboard
class AndroidScanner : Scanner
Link copied to clipboard
class ApplePeripheral : Peripheral
Link copied to clipboard
class AppleScanner : Scanner
Link copied to clipboard
class BluetoothDisabledException : BluetoothException
Link copied to clipboard
open class BluetoothException : Exception

Failure occurred with the underlying Bluetooth system.

Link copied to clipboard
typealias BluetoothLeException = BluetoothException
Link copied to clipboard
enum BondState : Enum<BondState>
Link copied to clipboard
class CentralManager
Link copied to clipboard
interface Characteristic
Link copied to clipboard
class ConnectionLostException : NotConnectedException
Link copied to clipboard
class ConnectionRejectedException : IOException
Link copied to clipboard
interface Descriptor
Link copied to clipboard
expect class DiscoveredCharacteristic : Characteristic

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

actual data class DiscoveredCharacteristic : Characteristic
Link copied to clipboard
expect class DiscoveredDescriptor : Descriptor

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

actual data class DiscoveredDescriptor : 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
Link copied to clipboard
expect sealed class Filter
actual sealed class Filter
Link copied to clipboard
class GattRequestRejectedException : BluetoothException

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

Link copied to clipboard
class GattStatusException : IOException
Link copied to clipboard
actual typealias Identifier = String
actual typealias Identifier = Uuid
expect class Identifier
actual typealias Identifier = String
Link copied to clipboard
actual typealias IOException = IOException
expect open class IOException : Exception
actual open class IOException : Exception
Link copied to clipboard
class JsPeripheral : Peripheral
Link copied to clipboard
class JsScanner : Scanner

Only available on Chrome 79+ with "Experimental Web Platform features" enabled via: chrome://flags/#enable-experimental-web-platform-features

Link copied to clipboard
object Kable
Link copied to clipboard
class KableInitializer : Initializer<Kable>
Link copied to clipboard
data class LazyCharacteristic : Characteristic
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 : IOException
Link copied to clipboard
class NotReadyException : NotConnectedException
Link copied to clipboard
class ObservationExceptionPeripheral
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
data class Options(val optionalServices: Array<String> = emptyArray(), val filters: Array<Options.Filter>? = null)

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

Link copied to clipboard
class OutOfOrderGattCallbackException : IllegalStateException
Link copied to clipboard
interface Peripheral
Link copied to clipboard
expect 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
enum Priority : Enum<Priority>
Link copied to clipboard
class ScanFailedException : IllegalStateException
Link copied to clipboard
interface Scanner
Link copied to clipboard
expect class ScannerBuilder
actual class ScannerBuilder
Link copied to clipboard
interface Service
Link copied to clipboard
expect class ServicesDiscoveredPeripheral
actual class ServicesDiscoveredPeripheral
Link copied to clipboard
sealed class State
Link copied to clipboard
enum Transport : Enum<Transport>

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

Link copied to clipboard

Mode specifying if config descriptor (0x2902) should be written to when starting/stopping an observation.

Link copied to clipboard
enum WriteType : Enum<WriteType>

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 CoroutineScope.peripheral(bluetoothDevice: BluetoothDevice, builderAction: PeripheralBuilderAction = {}): Peripheral
fun CoroutineScope.peripheral(identifier: Identifier, builderAction: PeripheralBuilderAction = {}): Peripheral
fun CoroutineScope.peripheral(    bluetoothDevice: BluetoothDevice,     transport: Transport,     phy: Phy = Phy.Le1M): Peripheral
fun CoroutineScope.peripheral(    advertisement: Advertisement,     transport: Transport,     phy: Phy = Phy.Le1M): Peripheral
fun CoroutineScope.peripheral(cbPeripheral: <ERROR CLASS>, builderAction: PeripheralBuilderAction): Peripheral
fun CoroutineScope.peripheral(identifier: Identifier, builderAction: PeripheralBuilderAction = {}): Peripheral
expect fun CoroutineScope.peripheral(advertisement: Advertisement, builderAction: PeripheralBuilderAction = {}): Peripheral
actual fun CoroutineScope.peripheral(advertisement: Advertisement, builderAction: PeripheralBuilderAction = {}): Peripheral
Link copied to clipboard
fun CoroutineScope.requestPeripheral(options: Options, builderAction: PeripheralBuilderAction = {}): Promise<Peripheral>
Link copied to clipboard
fun Scanner(builderAction: ScannerBuilder.() -> Unit = {}): Scanner
fun Scanner(services: List<Uuid>?): Scanner
@JvmName(name = "scannerWithFilters")
fun Scanner(filters: List<Filter>?): Scanner
Link copied to clipboard
expect fun String.toIdentifier(): Identifier
actual fun String.toIdentifier(): Identifier

Properties

Link copied to clipboard
val Characteristic.Properties.broadcast: Boolean
Link copied to clipboard
val Characteristic.Properties.extendedProperties: Boolean
Link copied to clipboard
expect val Peripheral.identifier: Identifier

The identifier of the remote device

actual val Peripheral.identifier: Identifier
Link copied to clipboard
val Characteristic.Properties.indicate: Boolean
Link copied to clipboard
val Characteristic.Properties.notify: Boolean
Link copied to clipboard
val Characteristic.Properties.read: Boolean
Link copied to clipboard
val Characteristic.Properties.signedWrite: Boolean
Link copied to clipboard
val Characteristic.Properties.write: Boolean
Link copied to clipboard