ServerBleGatt

A class for managing BLE connections. It propagates events (ServerGattEvent) to specified connection's corresponding characteristics (ServerBleGattCharacteristic) and descriptors (ServerBleGattDescriptor). Thanks to that values are getting updated.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Flow which emits each time a new connection is established or lost. It can be used to set up new connection's services behaviour.

Link copied to clipboard

Flow which emits collected connections as a Map each time a new connection is established.

Functions

Link copied to clipboard

Cancels connection with a particular device.

Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
fun stopServer()

Stops server. All connections will be dropped.