ServerBleGattCallback

A class which maps BluetoothGattServerCallback methods into ServerGattEvent events.

Parameters

bufferSize

A buffer size for events emitted by BluetoothGattServerCallback.

Constructors

Link copied to clipboard
constructor(bufferSize: Int)

Properties

Link copied to clipboard
val event: SharedFlow<ServerGattEvent>

Functions

Link copied to clipboard
open override fun onCharacteristicReadRequest(device: BluetoothDevice?, requestId: Int, offset: Int, characteristic: BluetoothGattCharacteristic)
Link copied to clipboard
open override fun onCharacteristicWriteRequest(device: BluetoothDevice?, requestId: Int, characteristic: BluetoothGattCharacteristic, preparedWrite: Boolean, responseNeeded: Boolean, offset: Int, value: ByteArray?)
Link copied to clipboard
open override fun onConnectionStateChange(device: BluetoothDevice?, status: Int, newState: Int)
Link copied to clipboard
open override fun onDescriptorReadRequest(device: BluetoothDevice?, requestId: Int, offset: Int, descriptor: BluetoothGattDescriptor)
Link copied to clipboard
open override fun onDescriptorWriteRequest(device: BluetoothDevice?, requestId: Int, descriptor: BluetoothGattDescriptor, preparedWrite: Boolean, responseNeeded: Boolean, offset: Int, value: ByteArray?)
Link copied to clipboard
Link copied to clipboard
open override fun onExecuteWrite(device: BluetoothDevice?, requestId: Int, execute: Boolean)
Link copied to clipboard
open override fun onMtuChanged(device: BluetoothDevice?, mtu: Int)
Link copied to clipboard
open override fun onNotificationSent(device: BluetoothDevice?, status: Int)
Link copied to clipboard
open override fun onPhyRead(device: BluetoothDevice?, txPhy: Int, rxPhy: Int, status: Int)
Link copied to clipboard
open override fun onPhyUpdate(device: BluetoothDevice?, txPhy: Int, rxPhy: Int, status: Int)
Link copied to clipboard
open override fun onServiceAdded(status: Int, service: BluetoothGattService)