NativeClientBleAPI

class NativeClientBleAPI(gatt: BluetoothGatt, callback: ClientBleGattCallback, val autoConnect: Boolean, val closeOnDisconnect: Boolean) : GattClientAPI

A wrapper around BluetoothGatt and BluetoothGattCallback. As an input it uses methods of BluetoothGatt and as an output callbacks from BluetoothGattCallback.

Constructors

Link copied to clipboard
constructor(gatt: BluetoothGatt, callback: ClientBleGattCallback, autoConnect: Boolean, closeOnDisconnect: Boolean)

Properties

Link copied to clipboard
open override val autoConnect: Boolean

Boolean value passed during connection.

Link copied to clipboard
open override val closeOnDisconnect: Boolean
Link copied to clipboard
open override val device: ServerDevice
Link copied to clipboard
open override val event: SharedFlow<ClientGattEvent>

Functions

Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun abortReliableWrite()
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun beginReliableWrite(): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun clearServicesCache()
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun close()
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun disableCharacteristicNotification(characteristic: IBluetoothGattCharacteristic): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun disconnect()
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun discoverServices(): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun enableCharacteristicNotification(characteristic: IBluetoothGattCharacteristic): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun executeReliableWrite(): Boolean
Link copied to clipboard
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun readCharacteristic(characteristic: IBluetoothGattCharacteristic): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun readDescriptor(descriptor: IBluetoothGattDescriptor): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun readPhy()
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun readRemoteRssi(): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun reconnect(): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun requestConnectionPriority(priority: BleGattConnectionPriority): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun requestMtu(@IntRange(from = 23, to = 517) mtu: Int): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun setPreferredPhy(txPhy: BleGattPhy, rxPhy: BleGattPhy, phyOption: PhyOption)
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun writeCharacteristic(characteristic: IBluetoothGattCharacteristic, value: DataByteArray, writeType: BleWriteType): Boolean
Link copied to clipboard
@RequiresPermission(value = "android.permission.BLUETOOTH_CONNECT")
open override fun writeDescriptor(descriptor: IBluetoothGattDescriptor, value: DataByteArray): Boolean