Bluetooth Delegate
class BluetoothDelegate(val callback: (DeviceEvent, BluetoothPeripheral, Any?) -> Unit) : BlueFalconDelegate
A delegate implementation for handling Bluetooth events using the BlueFalcon library.
Properties
Link copied to clipboard
A function to receive Bluetooth DeviceEvents with the associated BluetoothPeripheral and optional data.
Functions
Link copied to clipboard
open override fun didCharacteristcValueChanged(bluetoothPeripheral: BluetoothPeripheral, bluetoothCharacteristic: BluetoothCharacteristic)
Called when the value of a Bluetooth characteristic changes.
Link copied to clipboard
Called when a connection to a Bluetooth peripheral is established.
Link copied to clipboard
Called when a Bluetooth peripheral is disconnected.
Link copied to clipboard
Called when characteristics are discovered on the peripheral.
Link copied to clipboard
Called when services are discovered on the peripheral.
Link copied to clipboard
open override fun didReadDescriptor(bluetoothPeripheral: BluetoothPeripheral, bluetoothCharacteristicDescriptor: BluetoothCharacteristicDescriptor)
Called when a Bluetooth descriptor is read.
Link copied to clipboard
Called when the RSSI value is updated. This implementation ignores it.
Link copied to clipboard
Called when the MTU (Maximum Transmission Unit) is updated.
Link copied to clipboard
open override fun didWriteCharacteristic(bluetoothPeripheral: BluetoothPeripheral, bluetoothCharacteristic: BluetoothCharacteristic, success: Boolean)
Called when a characteristic is written.
Link copied to clipboard
open override fun didWriteDescriptor(bluetoothPeripheral: BluetoothPeripheral, bluetoothCharacteristicDescriptor: BluetoothCharacteristicDescriptor)
Called when a descriptor is written.