Build offline messaging between phones without internet or accounts
Imagine a scenario where you can only talk to others within radio range. This app connects smartphones directly to pass messages in such environments. It is a decentralized messaging tool that operates without a central server or phone numbers.
Combining two communication methods
The app uses Bluetooth mesh networks and the internet-based Nostr protocol together. When the internet is disconnected, it enables offline communication by relaying messages through nearby devices. When connected to the internet, it can send messages worldwide using Nostr relays. The app automatically selects the optimal transmission path for the current situation and queues messages for retry if the connection drops.
Location-based channels and security features
You can create chat rooms for specific areas using geographic coordinates. This feature works based on GeoHash coordinates on top of Nostr relays. Private messages are end-to-end encrypted using the Noise protocol, and channel chats offer a password protection option. It also embeds the Tor network to maintain privacy even when connected to the internet.
Implementation on Android
This repository is an Android implementation that maintains protocol compatibility with iOS and macOS versions. It is developed using Kotlin and Jetpack Compose and follows the MVVM architecture. Location permission is required for Bluetooth scanning, and a foreground service is used to maintain the mesh network in the background. Adaptive duty cycling and connection limits are applied for battery efficiency.
Building and testing
Android Studio and Android SDK API 26 or higher are required. After cloning the repository, you can build the debug APK using the ./gradlew assembleDebug command. Actual wireless operation of the Bluetooth mesh is difficult to simulate, so testing on real devices is necessary.
Things to check before use
This project is released in the public domain, so there are no license restrictions. However, Bluetooth mesh communication performance may vary depending on device hardware specifications and the surrounding environment. Internet-based communication relies on the availability of Nostr relays, so it is appropriate to consider it as an emergency communication means for offline or low-connectivity environments rather than expecting stable global communication. The app requests Bluetooth, location, and notification permissions upon installation, so you need to grant them.