Android native app for Z
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-07 19:59:29 +02:00
app thinking preview in dim color 2026-09-07 19:59:29 +02:00
.gitignore ignore local screenshots 2026-09-07 16:50:20 +02:00
build.gradle ZChat: GLM-5.3-flash chat UI, tabs history, photo/file attachments, brightness-sensor day/night (NomadWriter style) 2026-09-07 16:42:59 +02:00
gradle.properties ZChat: GLM-5.3-flash chat UI, tabs history, photo/file attachments, brightness-sensor day/night (NomadWriter style) 2026-09-07 16:42:59 +02:00
preview.png render ``` fenced code blocks with subtle tint + tap-to-copy link under each block 2026-09-07 18:18:36 +02:00
README.md README with screenshot 2026-09-07 18:36:24 +02:00
settings.gradle ZChat: GLM-5.3-flash chat UI, tabs history, photo/file attachments, brightness-sensor day/night (NomadWriter style) 2026-09-07 16:42:59 +02:00

ZChat

A minimal native Android chat client for Z.AI's GLM-5.3-Flash (streaming, vision-capable), styled after the flat monospace look of NomadWriter.

ZChat home screen

Features

  • Streaming chat — SSE streaming; reasoning models show their thinking process live in italics above the answer
  • Tabbed history — every chat is a tab (+ new, long-press to delete), persisted across restarts; Z tab is the home screen
  • Attachments — photos (auto-resized to max 1920px, sent as base64 vision content) and text files (inlined into the message)
  • Code blocks — ``` fenced sections render as code with a tap-to-copy link under each block
  • Themes — day / night / auto; auto follows the hardware brightness sensor with hysteresis (falls back to the system night mode)
  • Token meter — per-response usage from the API: total spent (today / week / total, in SQLite) and next-request context size as % of the 1.31M-token window
  • Resilience — automatic endpoint fallback (API-key vs Coding-Plan endpoints), one silent reconnect when a stream dies before any content arrives, partial answers are kept on mid-stream connection loss
  • Background notifications — reply (or error) arrives while the app is not on screen → system notification

Setup

  1. Build and install (see below), launch the app.
  2. Tap ➤ (or send anything) — paste your Z.AI API key when prompted. Long-press ➤ to change it later.
  3. Talk.

Both normal API keys and GLM Coding Plan keys work — the app tries api/paas/v4 first, then the Coding-Plan-only api/coding/paas/v4, and remembers which one your key needs.

Build

Plain Java, no AndroidX, no external dependencies.

gradle assembleRelease        # unsigned release APK
  • AGP 8.13.2, compileSdk 34, minSdk 23
  • every assemble* bumps the patch version in app/version.properties

Data & privacy

  • chats live in files/chats.json, token stats in files/stats.db (both local only)
  • the API key lives in a private SharedPreferences file
  • the only network traffic is HTTPS to api.z.ai

License

Do whatever.