Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
ab555f2
Automated update of relay data - Sun Dec 28 06:07:12 UTC 2025
actions-user Dec 28, 2025
903a458
Prevent quit notification from reappearing (#530)
callebtc Jan 2, 2026
0c7505b
fix: wifi aware socket binding (#533)
aidenvalue Jan 3, 2026
fa1978d
Revert "fix: wifi aware socket binding (#533)" (#535)
callebtc Jan 3, 2026
1b9f76b
Fix notification user try 2 (#541)
callebtc Jan 3, 2026
7c183b0
Automated update of relay data - Sun Jan 4 06:08:02 UTC 2026
actions-user Jan 4, 2026
54c96bd
Fix: Add @ConscryptMode annotation to FileTransferTest to resolve Uns…
rebroad Jan 4, 2026
d739765
Fix small-screen header clipping (#519) (#532)
Kargatharaakash Jan 4, 2026
c663e8e
QR and Verification feature (#529)
yet300 Jan 4, 2026
55b2d68
Enforce mandatory packet signature verification (#546)
callebtc Jan 4, 2026
123a24c
Revert "Fix small-screen header clipping (#519) (#532)" (#548)
callebtc Jan 4, 2026
fe5417b
fix: location channel manager (#516)
callebtc Jan 4, 2026
7ee61a0
fix: sync notification peer count with sidebar (#547)
callebtc Jan 4, 2026
eeaabf4
bump versioncode to 28 (#551)
callebtc Jan 5, 2026
95385da
verift signature only for ANNOUNCE, MESSAGE, and FILE_TRANSFER like i…
callebtc Jan 5, 2026
9733806
bump to 29 (#553)
callebtc Jan 5, 2026
423feb8
Fix/foreground permissions scanning (#556)
callebtc Jan 5, 2026
171483a
drop duplicate announces based on TTL (#558)
callebtc Jan 5, 2026
eef831f
scan duration fix (#557)
callebtc Jan 5, 2026
68407e3
feat: Build and release per-architecture APKs (#550)
moehamade Jan 5, 2026
5dc6369
bump vc to 30 (#559)
callebtc Jan 5, 2026
e313112
fix: r8 exception for LocationManager (#566)
callebtc Jan 8, 2026
d975b84
fix: MessageRouter uses stale BluetoothMeshService reference (#571)
callebtc Jan 9, 2026
0306ed4
fix camera button (#572)
callebtc Jan 9, 2026
fbcc289
Automated update of relay data - Sun Jan 11 06:07:53 UTC 2026
actions-user Jan 11, 2026
cbe7a2f
Fix scroll bug(#568) (#570)
yet300 Jan 12, 2026
c7e20a9
fix nostr private messages processing (#563)
a1denvalu3 Jan 12, 2026
e40fd10
New MeshPeerListSheet as Ios like (#498)
yet300 Jan 12, 2026
654d385
UI Refactor (#562)
yet300 Jan 12, 2026
d164b3f
Implement Geohash Presence (Heartbeats) (#576)
callebtc Jan 12, 2026
66012e9
Gossip mesh topology + source-based routing (#445)
callebtc Jan 12, 2026
ce71de2
Feat/graph force (#581)
callebtc Jan 12, 2026
dd856ac
visual logger refactor (#583)
callebtc Jan 13, 2026
829fb52
Update arti to 1.9.0 and produce 32 bit builds (#585)
callebtc Jan 14, 2026
94b28b2
Move PrivateChatSheet hosting into ChatDialogs and unify sheet state …
yet300 Jan 14, 2026
216352c
use bluetooth icon (#597)
callebtc Jan 14, 2026
e769a03
Fix/nostr dm bottom sheet (#598)
callebtc Jan 14, 2026
5ec02c9
Fix and Improve LocationManager logic (#599)
callebtc Jan 15, 2026
41945e6
OSM fallback for geocoding (#611)
callebtc Jan 15, 2026
e3310a3
security: prevent storage exhaustion by saving incoming files to cach…
a1denvalu3 Jan 15, 2026
c2f60d6
announce peer ID in servicedata to prevent duplicate connections (#613)
callebtc Jan 15, 2026
9dfebd7
Refactor: Implement Hybrid Location Provider (System/Fused) (#612)
callebtc Jan 15, 2026
ae67fa4
fix(security): Clear in-memory keys during panic mode (#596)
callebtc Jan 15, 2026
8358073
improve verification sheet (#615)
callebtc Jan 15, 2026
83fbcca
Implement iOS-compatible Direct Peer Detection (TTL Logic) (#574)
callebtc Jan 15, 2026
c64ea0a
fix: centralize and strictly enforce connection limits (#618)
callebtc Jan 15, 2026
5501141
Fix: Correctly parse recipient/sender IDs in broadcaster to enable un…
callebtc Jan 15, 2026
39e43fa
security: ensure media files are deleted during panic mode (#607)
a1denvalu3 Jan 15, 2026
db26b67
fix: Ensure empty neighbor lists in newer announcements clear mesh ed…
callebtc Jan 15, 2026
a131099
fix(ui): Show acquiring location state instead of unavailable (#621)
a1denvalu3 Jan 15, 2026
fddadbe
Fix/590-Private-key-stored-as-Plain-text (#603)
anupamjhabbl Jan 15, 2026
51a06cf
Refactored BottomSheetTopBar to BitchatSheetTopBar (#601)
yet300 Jan 15, 2026
e07bee5
spacing for geohash sheet text (#623)
callebtc Jan 15, 2026
5013b32
feat: Introduce Gradle property to control APK splits (#560)
moehamade Jan 15, 2026
e3056d7
bump to 1.7.0 (#624)
callebtc Jan 15, 2026
ab04764
Fix location update in notes sheet and Nostr subscription leaks (#636)
callebtc Jan 16, 2026
46e3089
Automated update of relay data - Sun Jan 18 06:07:42 UTC 2026
actions-user Jan 18, 2026
06d2665
Automated update of relay data - Sun Jan 25 06:07:49 UTC 2026
actions-user Jan 25, 2026
f79451b
fix(geohash): cleanup sampling subscriptions when closing location sh…
a1denvalu3 Jan 31, 2026
73d8ce5
Automated update of relay data - Sun Feb 1 06:19:30 UTC 2026
actions-user Feb 1, 2026
43029e8
fix: pause geohash heartbeat (kind 20001) sampling when backgrounded …
a1denvalu3 Feb 1, 2026
390f264
bump (#661)
callebtc Feb 1, 2026
3e5355a
edit
callebtc Feb 3, 2026
6d44919
Automated update of relay data - Sun Feb 8 06:20:17 UTC 2026
actions-user Feb 8, 2026
dc8b6ee
Automated update of relay data - Sun Feb 15 06:19:54 UTC 2026
actions-user Feb 15, 2026
4f62e68
Automated update of relay data - Sun Feb 22 06:17:38 UTC 2026
actions-user Feb 22, 2026
fb2bb64
chore: change license from MIT to GPLv3 (#674)
callebtc Feb 28, 2026
632ee88
Automated update of relay data - Sun Mar 1 06:17:19 UTC 2026
actions-user Mar 1, 2026
bc8909b
voice note player ui (#680)
kinerycl Mar 6, 2026
9ad1214
Unit tests for BinaryProtocol (#678)
rollforsats Mar 6, 2026
4082a48
Automated update of relay data - Sun Mar 8 06:15:21 UTC 2026
actions-user Mar 8, 2026
9fb8d4b
Automated update of relay data - Sun Mar 15 06:23:41 UTC 2026
actions-user Mar 15, 2026
95daa47
Automated update of relay data - Sun Mar 22 06:19:38 UTC 2026
actions-user Mar 22, 2026
ce86f4e
update input button styling (#682)
kinerycl Mar 25, 2026
dac81b2
fix: use CSPRNG for heartbeat intervals (#685)
a1denvalu3 Mar 25, 2026
96b35e9
Add 'Send private message' action to chat user sheet (#649)
a1denvalu3 Mar 25, 2026
5b0a7d0
fix: add input validation for protocol decoding and fragment reassemb…
0x0v1 Mar 26, 2026
426e4f0
Automated update of relay data - Sun Mar 29 06:27:23 UTC 2026
actions-user Mar 29, 2026
be1a2ec
update version (#688)
callebtc Mar 30, 2026
e3c7bd5
Revert "update input button styling (#682)" (#689)
callebtc Mar 30, 2026
4dfec91
Revert "voice note player ui (#680)" (#690)
callebtc Mar 30, 2026
42f6cf9
Automated update of relay data - Sun Apr 5 06:29:20 UTC 2026
actions-user Apr 5, 2026
47adcca
Automated update of relay data - Sun Apr 12 06:35:32 UTC 2026
actions-user Apr 12, 2026
c332fb2
Automated update of relay data - Sun Apr 19 06:37:36 UTC 2026
actions-user Apr 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Android CI

on:
workflow_dispatch:
push:
branches: [ "main", "develop" ]
pull_request:
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,20 @@ jobs:
- name: Grant execute permission for Gradlew
run: chmod +x ./gradlew

- name: Build Release APK (with Tor)
- name: Build Release APKs (with architecture splits)
run: ./gradlew assembleRelease --no-daemon --stacktrace

- name: List APK files
run: |
echo "APK files built:"
find app/build/outputs/apk -name "*.apk" -type f
find app/build/outputs/apk/release -name "*.apk" -type f -exec ls -lh {} \;

- name: Rename APK
- name: Rename APKs for GitHub Release
run: |
mv app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/bitchat-android.apk
cd app/build/outputs/apk/release
[ -f "app-arm64-v8a-release-unsigned.apk" ] && mv app-arm64-v8a-release-unsigned.apk bitchat-android-arm64.apk
[ -f "app-x86_64-release-unsigned.apk" ] && mv app-x86_64-release-unsigned.apk bitchat-android-x86_64.apk
[ -f "app-universal-release-unsigned.apk" ] && mv app-universal-release-unsigned.apk bitchat-android-universal.apk

- name: DEBUG
run: |
Expand All @@ -59,8 +62,8 @@ jobs:
ls -all
tree || ls -R

# Optional: Sign APK (requires secrets)
# - name: Sign APK
# Optional: Sign APKs (uncomment and configure secrets when ready)
# - name: Sign APKs
# uses: r0adkll/sign-android-release@v1
# with:
# releaseDirectory: app/build/outputs/apk/release
Expand All @@ -69,10 +72,10 @@ jobs:
# keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
# keyPassword: ${{ secrets.KEY_PASSWORD }}

- name: Upload APK as artifact
- name: Upload APKs as artifacts
uses: actions/upload-artifact@v4
with:
name: bitchat-android-apk-${{ github.ref_name }}
name: bitchat-android-release-${{ github.ref_name }}
path: app/build/outputs/apk/release/*.apk
retention-days: 30
if-no-files-found: error
Expand All @@ -82,25 +85,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Download APK artifact
- name: Download release artifacts
uses: actions/download-artifact@v4
with:
name: bitchat-android-apk-${{ github.ref_name }}
name: bitchat-android-release-${{ github.ref_name }}
path: release

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
release/bitchat-android.apk
release/bitchat-android-arm64.apk
release/bitchat-android-x86_64.apk
release/bitchat-android-universal.apk
name: Release ${{ github.ref_name }}
body: |
## bitchat Android Release

**bitchat-android.apk** (~15MB)
- Secure P2P messaging over Bluetooth mesh and Nostr
- Built-in Tor support (custom Arti build with 16KB page size)
- Compatible with Google Play requirements (Nov 2025+)
- Cross-platform compatible with iOS version
**bitchat-android-arm64.apk** - ARM64 (most phones)
**bitchat-android-x86_64.apk** - x86_64 (Chromebooks, tablets)
**bitchat-android-universal.apk** - All architectures (fallback)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74 changes: 74 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Bitchat Android - Agent Guide

This document provides context, architectural insights, and development standards for AI agents working on the Bitchat Android codebase.

## 1. Project Overview
**Bitchat** is a decentralized, off-grid communication application focused on privacy and censorship resistance. It utilizes mesh networking (primarily Bluetooth LE and Tor/Arti) to enable peer-to-peer messaging without centralized servers.

**Key Technologies:**
- **Language:** Kotlin (JVM Target 1.8)
- **UI Framework:** Jetpack Compose (Material 3)
- **Asynchronous:** Kotlin Coroutines & Flow
- **Networking:** Bluetooth Low Energy (BLE), Tor (Arti Rust bridge), OkHttp
- **Architecture:** MVVM with Clean Architecture principles
- **Build System:** Gradle (Kotlin DSL)

## 2. Architecture & Directory Structure
The application follows a clean architecture pattern, heavily modularized by feature within the `app` module.

**Root Package:** `com.bitchat.android`

| Directory | Purpose |
|-----------|---------|
| `ui/` | **Presentation Layer**: Jetpack Compose screens, themes, and ViewModels. |
| `service/` | **Core Service**: Contains `MeshForegroundService`, managing persistent background connectivity. |
| `mesh/` | **Mesh Networking**: Logic for peer discovery, advertising, and message routing. |
| `protocol/` | **Wire Protocol**: Definitions of messages exchanged between peers. |
| `crypto/` | **Security**: Cryptographic primitives and key management. |
| `noise/` | **Encryption**: Implementation of the Noise Protocol Framework for secure channels. |
| `identity/` | **User Identity**: Management of user profiles and public/private keys. |
| `features/` | **App Features**: Sub-modules for `voice`, `file`, and `media` handling. |
| `nostr/` | **Relay Integration**: Logic for Nostr protocol integration and relay management. |
| `geohash/` | **Location**: Utilities for location-based features and geohashing. |
| `net/` | **Networking**: General network utilities and abstractions. |

## 3. Key Components

### UI Layer (Jetpack Compose)
- **Activity**: Single-Activity architecture (`MainActivity.kt`).
- **Navigation**: Jetpack Compose Navigation.
- **State Management**: `ViewModel` exposing `StateFlow` to Composables.
- **Theme**: Custom theme definitions in `ui/theme`.

### Networking & Connectivity
- **MeshForegroundService**: The critical component that keeps the mesh network alive. It manages the lifecycle of BLE scanning/advertising and other transport layers.
- **BLE Stack**: Located in `mesh/` and `net/`, handles the intricacies of Android Bluetooth interactions.
- **Tor/Arti**: Integrated via JNI (`jniLibs`) to provide anonymous internet routing where available.

## 4. Development Standards

### Code Style
- **Kotlin**: Adhere to official Kotlin coding conventions.
- **Compose**: Use functional components. Hoist state to ViewModels where possible.
- **Coroutines**: Use `suspend` functions for all I/O operations. strictly avoid blocking the main thread.
- **Naming**: Clear, descriptive names. Follow standard Android naming patterns (e.g., `*ViewModel`, `*Repository`, `*Screen`).

### Testing
- **Unit Tests**: Located in `app/src/test/`. Use for business logic, protocols, and utility testing.
- **Instrumented Tests**: Located in `app/src/androidTest/`. Use for UI and permission integration testing.
- **Execution**:
- Unit: `./gradlew test`
- Instrumented: `./gradlew connectedAndroidTest`

## 5. Critical Constraints & Gotchas
1. **Permissions**: The app relies heavily on dangerous runtime permissions (Location, Bluetooth Scan/Connect/Advertise, Audio Recording). Always verify permission handling patterns in `MainActivity` or permission wrappers before adding new hardware features.
2. **Hardware Dependency**: Features like BLE are difficult to emulate. When writing code for these, focus on robust error handling and defensive programming as hardware behavior can be flaky.
3. **Background Limits**: Android enforces strict background execution limits. Network operations intended to persist must be tied to the `MeshForegroundService`.

## 6. Common Tasks
- **Build Debug APK**: `./gradlew assembleDebug`
- **Lint Check**: `./gradlew lint`
- **Clean Build**: `./gradlew clean`

---
*Note: This file is intended to assist AI agents in navigating and modifying the codebase efficiently. Always verify context by reading the actual files before making changes.*
Loading