
commonMain.dev.bluefalcon.BlueFalcon.kt Maven / Gradle / Ivy
package dev.bluefalcon
expect class BlueFalcon(context: ApplicationContext, serviceUUID: String?) {
val delegates: MutableSet
var isScanning: Boolean
fun connect(bluetoothPeripheral: BluetoothPeripheral, autoConnect: Boolean = false)
fun disconnect(bluetoothPeripheral: BluetoothPeripheral)
@Throws(
BluetoothUnknownException::class,
BluetoothResettingException::class,
BluetoothUnsupportedException::class,
BluetoothPermissionException::class,
BluetoothNotEnabledException::class
)
fun scan()
fun stopScanning()
fun readCharacteristic(
bluetoothPeripheral: BluetoothPeripheral,
bluetoothCharacteristic: BluetoothCharacteristic
)
fun notifyCharacteristic(
bluetoothPeripheral: BluetoothPeripheral,
bluetoothCharacteristic: BluetoothCharacteristic,
notify: Boolean
)
fun indicateCharacteristic(
bluetoothPeripheral: BluetoothPeripheral,
bluetoothCharacteristic: BluetoothCharacteristic,
indicate: Boolean
)
fun notifyAndIndicateCharacteristic(
bluetoothPeripheral: BluetoothPeripheral,
bluetoothCharacteristic: BluetoothCharacteristic,
enable: Boolean
)
fun writeCharacteristic(
bluetoothPeripheral: BluetoothPeripheral,
bluetoothCharacteristic: BluetoothCharacteristic,
value: String,
writeType: Int?
)
fun writeCharacteristic(
bluetoothPeripheral: BluetoothPeripheral,
bluetoothCharacteristic: BluetoothCharacteristic,
value: ByteArray,
writeType: Int?
)
fun readDescriptor(
bluetoothPeripheral: BluetoothPeripheral,
bluetoothCharacteristic: BluetoothCharacteristic,
bluetoothCharacteristicDescriptor: BluetoothCharacteristicDescriptor
)
fun changeMTU(bluetoothPeripheral: BluetoothPeripheral, mtuSize: Int)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy