About This Session
Building Bluetooth Low Energy features has long been challenging since every platform behaves differently and the code quickly fragments. Kotlin Multiplatform changes that story by letting you build reliable Bluetooth functionality once, so even if you’re new to BLE, you can start with confidence instead of chaos. With Kotlin Multiplatform (KMP) and the Kable library, you can create a single BLE layer that runs across Android, iOS, and macOS, with experimental Web support. Kable abstracts platform quirks through coroutines and Flow, delivering predictable async behavior across targets. We'll briefly cover BLE fundamentals such as clients, peripherals, services, and characteristics to lay the groundwork. In a live demo, we'll control a Bluetooth-enabled light from a shared KMP CLI app. You’ll see how coroutines make reads and writes feel sequential, while Flows stream live updates like connection state, battery level, or sensor data. Structured concurrency keeps the client stable and predictable, even when devices disconnect or data changes rapidly. Key takeaways: - Build a cross-platform BLE client - Use coroutines and Flow for reliable, idiomatic async BLE operations - Apply structured concurrency for robust connection management and cleanup
Topics
- Android
- Cross-Platform
- iOS
- Kotlin
- Kotlin Multiplatform