Bitchat for Android is a decentralized peer-to-peer messaging application written in Kotlin that enables offline and internet-based communication without requiring accounts, phone numbers, or central servers. The app implements a dual transport architecture combining Bluetooth LE mesh networking for local offline communication with the Nostr protocol for global internet-based messaging, making it fully protocol-compatible with the iOS version of bitchat for cross-platform interoperability.
The Bluetooth mesh component allows direct peer-to-peer communication within Bluetooth range and supports multi-hop relay through nearby devices with a maximum of seven hops. Messages are encrypted using the Noise Protocol with the XX pattern, X25519 key exchange, and ChaCha20-Poly1305 authenticated encryption, providing end-to-end encryption with forward secrecy. The mesh network implements peer discovery, compact binary packet formatting with fragmentation support, TTL-based routing, and deduplication. A foreground service maintains mesh connectivity within Android's background execution constraints, while adaptive duty cycling and connection limits optimize battery consumption.
The Nostr protocol integration provides global reach through public relays and enables location-based channels using geohash coordinates. Private messages can fall back to Nostr for mutual favorites when the mesh is unavailable, with ephemeral keys generated per geohash area. The app supports Wi-Fi Aware transport for higher-bandwidth local mesh communication on compatible devices and includes built-in Tor support through the Arti implementation for private internet connectivity.
The user interface is built with Jetpack Compose and Material 3, featuring IRC-style commands including /join, /msg, and /who for familiar interaction patterns. Location-based channels enable geographic chat rooms, and the app includes a geohash globe picker for selecting communication areas. Channel chats support topic-based group messaging with optional password protection using Argon2id and AES-256-GCM encryption. An emergency wipe feature allows users to instantly clear all data with a triple-tap gesture.
The technical architecture uses Kotlin with Jetpack Compose for the UI layer and Coroutines and Flow for all networking and state management following an MVVM pattern. Core components include MeshForegroundService for persistent connectivity, BluetoothMeshService and WifiAwareMeshService for transport implementations, UnifiedMeshService for intelligent transport selection, NoiseSessionManager for encryption session management, and MessageRouter for handling mesh and Nostr routing with outbox retry logic.
The application requires Android API 26 or higher and requests Bluetooth, location, and notification permissions at runtime. Location permission is required for BLE scanning functionality. The project supports reproducible builds with byte-for-byte verification in a pinned Linux container, and maintainers can follow the provided Android release guide. The codebase is released into the public domain. While unit tests cover protocol and session logic, BLE mesh behavior testing requires real devices due to emulation limitations. The app is available on Google Play and through GitHub releases.