Android chat app that talks to an OpenClaw-compatible server over WebSocket, supports streaming assistant replies, attachments, local history, and model selection.
- WebSocket streaming chat (
chat.send/agent/chatevents). - File/image attachments (base64 in-stream).
- Local-only conversation history (JSON files under app private storage).
- Device identity + Ed25519 signing; default seed is generated at runtime (no hardcoded key).
- Settings screen for server URL, API token, and model list fetched from server.
- Android Studio Iguana or later.
- Android Gradle Plugin 8.x (uses Gradle wrapper in repo).
- JDK 17 (bundled with Android Studio is fine).
- Min SDK 24, target/compile SDK 34.
./gradlew assembleDebug
# or install to device
./gradlew installDebug- Launch app -> Settings.
- Fill:
- Server URL: e.g.
https://your-openclaw-server.example.com/ - API Token (optional, sent as
?token=and in connect auth). - Model: pick from the fetched list or type manually.
- Server URL: e.g.
- Save and return to main screen to chat.
HARDCODED_SEEDis intentionally empty to avoid shipping a static private key.- On first run the app generates an Ed25519 keypair, saves base64 in
SharedPreferences, and derivesdeviceIdas SHA-256(publicKey). - If you must pin a device ID, you can set
HARDCODED_SEED(base64url, 32 bytes) inApiClient.java; do this only for internal builds.
- Conversations are stored locally in app private storage:
getFilesDir()/convs/{id}.json. - Nothing is uploaded unless your server logs requests/responses; the client itself does not sync history.
app/src/main/java/com/openclaw/app/ApiClient.java— WebSocket logic, signing, retries.MainActivity— chat UI, streaming updates, attachments.ConversationStore— local history persistence.SettingsActivity— server/model configuration, device ID display.ChatForegroundService— keeps process alive during streaming.
- debug: no minify/shrink.
- release: R8 shrink + ProGuard rules in
proguard-rules.pro.
- Cannot connect: verify server URL includes scheme; check token; server must speak the same protocol version (min/max 3).
- Pairing required: server may enforce pairing on
connectchallenge; see server logs. - Attachments over 10 MB are rejected client-side.
- Fork & PRs welcome. Keep line endings LF in commits; repo may show CRLF warnings on Windows but Git will normalize.
- Please avoid committing secrets (tokens, seeds, keystores).
Not specified yet. If you plan to distribute, add an OSI license (e.g., MIT/Apache-2.0).
- TLS trust: current
ApiClientinstalls a trust-allX509TrustManagerand disables hostname verification to ease self-signed testing. For production, switch back to system trust anchors and enable hostname checks to avoid MITM. - Cleartext:
network_security_configonly permits HTTP for private LAN ranges (10.x/192.168.x/localhost); public domains remain HTTPS-only. Keep it that way for production. - Secrets:
HARDCODED_SEEDis intentionally empty; do not commit real seeds or API tokens. Prefer runtime config or env/remote config. - Privacy: the client stores history locally and does not upload it. If your server logs conversations, disclose that in your privacy policy and comply with data retention/consent requirements.
- Third-party licenses: include notices for OkHttp, Markwon, BouncyCastle, AndroidX (Apache-2.0/MIT family). Add a project license (MIT/Apache-2.0 recommended) before public release or app store submission.
- Store listing/DSR: if publishing (e.g., Play Store), provide a Privacy Policy URL and fill Data Safety accordingly (collects text input if you log server-side).