A cross-platform Bluetooth chat application built with Kotlin Multiplatform and Compose Multiplatform. It allows users to scan for nearby devices and exchange messages over Bluetooth Low Energy (BLE).
- Device Discovery: Scan for nearby Bluetooth devices.
- Real-time Chat: Exchange text messages over a BLE connection.
- Cross-Platform: Shared UI and logic across Android and iOS.
| Device Discovery | Real-time Chat |
|---|---|
![]() |
![]() |
- Kotlin Multiplatform: Shared business logic and infrastructure.
- Compose Multiplatform: Declarative UI shared between Android and iOS.
- Blue Falcon: Multiplatform Bluetooth Low Energy library.
- Koin: Pragmatic lightweight dependency injection.
- Kermit: Kotlin Multiplatform logging utility.
:core: Contains the core BLE implementation, data sources, and shared domain models.:features:listdevices: Feature module for scanning and listing available Bluetooth devices.:features:chat: Feature module for the messaging UI and logic.:androidApp: Android-specific entry point and configuration.:iosApp: iOS-specific entry point (SwiftUI) and configuration.:shared: Placeholder for other shared UI components or resources.
The app requires Bluetooth permissions to function correctly:
Requires BLUETOOTH_SCAN, BLUETOOTH_ADVERTISE, BLUETOOTH_CONNECT, and ACCESS_FINE_LOCATION (depending on the API level). These are declared in androidApp/src/main/AndroidManifest.xml.
Requires NSBluetoothAlwaysUsageDescription and NSBluetoothPeripheralUsageDescription in iosApp/iosApp/Info.plist.
- Android Studio (latest stable version)
- Xcode (for iOS development)
- Android: Run the
:androidAppconfiguration from Android Studio. - iOS:
- Open
iosApp/iosApp.xcodeprojin Xcode. - Select a simulator or a physical device and press Run.
- Open
- Common Logic: Run
./gradlew :core:test - Android: Run
./gradlew :androidApp:connectedAndroidTest

