OffChat Android is an offline-first Android prototype for peer-to-peer chat discovery and message transfer using Google Nearby Connections. It is the mobile counterpart to the OffChat simulator and explores real-device discovery, advertising, connection handshakes, and local persistence.
- Android peer discovery and advertising through Nearby Connections.
- P2P cluster strategy for multi-device mesh-style connectivity.
- Runtime permission handling for Android 12+ Bluetooth and nearby-device APIs.
- Room database structure for offline-first message persistence.
- Kotlin Android project ready to open in Android Studio.
- Kotlin
- Android SDK
- Google Play Services Nearby Connections
- Room Database
- Coroutines
- Open Android Studio.
- Select
Open. - Choose this repository folder.
- Let Gradle sync dependencies.
- Run on two or more Android devices for peer discovery testing.
app/src/main/java/com/research/offchat/MainActivity.kt
app/src/main/java/com/research/offchat/OffChatManager.kt
app/src/main/java/com/research/offchat/OffChatDatabase.kt
app/src/main/java/com/research/offchat/MessageDao.ktThe app requires Bluetooth, location, Wi-Fi state, and nearby-device permissions depending on Android version.