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.

  • Class
    Description
    Lifecycle states of the local Bluetooth adapter, a union of the Android BluetoothAdapter states and the iOS CBManagerState values.
    Observes local adapter state changes registered via Bluetooth.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 every BluetoothException fired through the failure path of the asynchronous Bluetooth APIs.
    Thrown via the failure path of every AsyncResource returned by the Bluetooth APIs.
    The runtime permissions the Bluetooth API may need, abstracted across platforms.
    Immutable 128-bit Bluetooth UUID value type used throughout the com.codename1.bluetooth API for services, characteristics and descriptors.
    Pairing state of a remote BluetoothDevice.
    The transport family a remote BluetoothDevice supports, mirroring Android's device-type classification.