

This repo contains examples for kotlin MP, ios and android in the examples folder, install their dependencies, and run it locally: Kotlin MP Basic Usage iOS & MacOSĬreate an instance of BlueFalcon and then call the scan method.īy passing in a string uuid of the service uuid, you can filter to scan for only devices that have that service.įun connect( bluetoothPeripheral : BluetoothPeripheral, autoConnect : Boolean)įun disconnect( bluetoothPeripheral : BluetoothPeripheral)īluetoothPeripheral : BluetoothPeripheral,īluetoothCharacteristic : BluetoothCharacteristicīluetoothCharacteristic : BluetoothCharacteristic,īluetoothCharacteristicDescriptor : BluetoothCharacteristicDescriptorįun changeMTU( bluetoothPeripheral : BluetoothPeripheral, mtuSize : Int) Examples The difference? each platform is compiled down to the native code, so when you use the library in iOS, you are consuming an obj-c library and same principle for Android and so on. What this library isn't? It is not a cross platform library, this is a multiplatform library. The idea is to have a common api for using bluetooth as the principle of bluetooth is the same but each platform ios and android has different apis which means you have to duplicate the logic for each platform. This library is the glue that brings those together so that mobile developers can use one common api to perform the bluetooth actions. connect to device, fetch services, fetch characteristics. A Bluetooth "Cross Platform" Kotlin Multiplatform library for iOS, Android, MacOS, Raspberry Pi and Javascript.īluetooth in general has the same functionality for all platforms, e.g.
