NordicTransport

Production Transport over the Nordic Android-BLE-Library.

Scanning uses the platform android.bluetooth.le.BluetoothLeScanner (no extra dep; robust on minSdk 24+), filtering by BrainAccess advertised name via DeviceModel.fromAdvertisedName. Each connection gets its own BrainAccessBleManager — a per-device GATT op queue, which is how scan-while-connected and multiple simultaneous devices come for free.

The SDK never requests runtime permissions (consumer responsibility); a missing one surfaces as BrainAccessError.MissingPermission. See BlePermissions for the required set per API level.

Parameters

context

any Context; the application context is retained.

Constructors

Link copied to clipboard
constructor(context: Context)

Functions

Link copied to clipboard
open override fun bluetoothState(): Flow<Boolean>

Phone Bluetooth adapter on/off; emits the current state, then updates on ACTION_STATE_CHANGED.

Link copied to clipboard
open suspend override fun connect(id: DeviceId): GattConnection
Link copied to clipboard
open override fun scan(): Flow<DiscoveredDevice>