Package-level declarations
Types
Abstract sealed class representing a type of BLE operation
Abstract sealed class representing a type of BLE operation
Read the value of a characteristic represented by characteristicUuid
Write payload as the value of a characteristic represented by characteristicUuid
Connect to device and perform service discovery
Read the value of a descriptor represented by descriptorUuid
Write payload as the value of a descriptor represented by descriptorUuid
Disable notifications/indications on a characteristic represented by characteristicUuid
Disconnect from device and release all connection resources
Disconnect from device and release all connection resources
Owns the BluetoothPlatform and references to the Rust-based BLE Client and Server transports. Previously these were long-lived instances but sometimes the Android BLE stack gums up and stops reporting events properly until the app is restarted. The nuclear solution of dropping and recreating the BluetoothPlatform resolves this situation. At the expense of background support, this manager class will track disabled/enabled events and fully stop or start the platform accordingly.
Enable notifications/indications on a characteristic represented by characteristicUuid
Describes the action the BLE platform should take after receiving an android.bluetooth.BluetoothGattCallback.onConnectionStateChange event.
Describes how to tear down a GATT when the platform or Rust core requests a disconnect.
Represents hexadecimal format options.
Request for an MTU of mtu
Properties
Added in API Level 31, equivalent to BluetoothStatusCodes.ERROR_UNKNOWN or Integer.MAX_VALUE.
Added in API Level 31, equivalent to BluetoothStatusCodes.SUCCESS.
Added in API Level 33, equivalent to BluetoothStatusCodes.ERROR_GATT_WRITE_REQUEST_BUSY https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_GATT_WRITE_REQUEST_BUSY
UUID of the Client Characteristic Configuration Descriptor (CCCD, 0x2902). This is used to enable notifications or indications in BLE.
Characteristic for writing an announce string. This is used by the central to notify the peripheral that the connection is ready.
Characteristic for reading control data.
Characteristic for writing control data.
Characteristic for reading L2CAP PSM. This is needed by the central to connect to the L2CAP socket that the peripheral is listening on.
Characteristic for reading mesh data.
Characteristic for writing mesh data.
Functions
Wraps ConcurrentHashMap.computeIfPresent in an SDK version agnostic API.
Check if a BluetoothGattDescriptor has a property bit flag.
Check if a BluetoothGattCharacteristic has a property bit flag.
Returns the first BluetoothGattCharacteristic with the given UUID, if any.
Returns the first BluetoothGattDescriptor with the given UUID, if any.
Builds a new HexFormat by configuring its format options using the specified builderAction, and returns the resulting format.
Parses bytes from this string using the specified HexFormat.
Parses a Short value from this string using the specified format.
Convenience extension function that returns true if this BluetoothGattDescriptor is a Client Characteristic Configuration Descriptor.
Checks if the given Throwable is a DeadSystemRuntimeException or DeadObjectException, which indicates that the Bluetooth system service has died unexpectedly.
Wraps BluetoothGattServer.notifyCharacteristicChanged in an SDK version agnostic API.
Wraps ConcurrentLinkedQueue.removeIfCompat in an SDK version agnostic API.
Determines the action to take for a client-side onConnectionStateChange event.
Determines how to disconnect a GATT that is tracked in the connections map.
Convert a MAC address String into a UUID byte array.
Formats this Byte value using the specified format.
Formats bytes in this array using the specified format.
Formats this Int value using the specified format.
Formats this Long value using the specified format.
Formats this Short value using the specified format.
Formats bytes in this array using the specified HexFormat.
Wraps BluetoothGatt.writeCharacteristic in an SDK version agnostic API.
Wraps BluetoothGatt.writeDescriptor in an SDK version agnostic API.