Package com.codename1.bluetooth.le
package com.codename1.bluetooth.le
BLE central role: scanning (BluetoothLE, ScanSettings,
ScanFilter, ScanResult, BleScan), connections and the GATT
client (BlePeripheral, connection events) and L2CAP
connection-oriented channels (L2capChannel, L2capServer).
Obtain the entry point via Bluetooth.getInstance().getLE(). Any
number of scans and per-peripheral GATT operations may run
concurrently -- an internal queue serializes operations toward the
platform stack and every call returns its own AsyncResource.
-
ClassDescriptionThe parsed payload of a BLE advertisement: local name, advertised service UUIDs, manufacturer data, service data and TX power.A remote BLE peripheral: connection lifecycle, GATT client operations and L2CAP channels.Live handle of a running BLE scan returned by
BluetoothLE.startScan(ScanSettings, ScanListener).The BLE central role: scanning for peripherals and re-obtaining known ones.Payload of aConnectionListenercallback describing aBlePeripheralstate transition.ObservesBlePeripheralconnection state transitions registered viaBlePeripheral.addConnectionListener(ConnectionListener).Options forBlePeripheral.connect(ConnectionOptions).Connection-interval preference requested viaBlePeripheral.requestConnectionPriority(ConnectionPriority).Lifecycle states of aBlePeripheralconnection.An open L2CAP connection-oriented channel -- a raw bidirectional byte stream to a peripheral, obtained viaBlePeripheral.openL2capChannel(int, boolean)on the central side or accepted from anL2capServeron the peripheral side.A listening L2CAP endpoint on the local device, opened viaBluetoothLE.openL2capServer(boolean)when acting as a peripheral.A single scan filter -- all criteria set on one filter are AND-combined; multiple filters added to aScanSettingsare OR-combined.Receives advertisement sightings during a scan started viaBluetoothLE.startScan(ScanSettings, ScanListener).Power/latency trade-off of a BLE scan, mirroring Android's scan modes.One advertisement sighting delivered to aScanListenerduring a scan.Options for a BLE scan started viaBluetoothLE.startScan(ScanSettings, ScanListener).