Package com.codename1.bluetooth
package com.codename1.bluetooth
Cross-platform Bluetooth API: adapter state, runtime permissions and capability queries.
Bluetooth.getInstance() returns the platform implementation and is
the single entry point; from it, getLE() reaches the BLE central
role (com.codename1.bluetooth.le), getLE().openGattServer(...) /
startAdvertising(...) the peripheral role
(com.codename1.bluetooth.le.server) and getClassic() classic
RFCOMM (com.codename1.bluetooth.classic). Identity types
(BluetoothDevice, BluetoothUuid) and the typed error model
(BluetoothError, BluetoothException) live here.
Every callback of the API is delivered on the EDT; only the blocking RFCOMM/L2CAP streams are consumed off it.
-
ClassDescriptionLifecycle states of the local Bluetooth adapter, a union of the Android
BluetoothAdapterstates and the iOSCBManagerStatevalues.Observes local adapter state changes registered viaBluetooth.addAdapterStateListener(AdapterStateListener).Entry point for the Codename One Bluetooth API -- adapter state, runtime permissions and the capability queries that let cross-platform code branch cleanly.Identity of a remote Bluetooth device, shared by the LE and classic stacks.Typed error codes carried by everyBluetoothExceptionfired through the failure path of the asynchronous Bluetooth APIs.Thrown via the failure path of everyAsyncResourcereturned by the Bluetooth APIs.The runtime permissions the Bluetooth API may need, abstracted across platforms.Immutable 128-bit Bluetooth UUID value type used throughout thecom.codename1.bluetoothAPI for services, characteristics and descriptors.Pairing state of a remoteBluetoothDevice.The transport family a remoteBluetoothDevicesupports, mirroring Android's device-type classification.