r/androiddev • u/Fit-Suggestion-8526 • 3h ago
Open Source Open-source native Kotlin + Jetpack Compose client for DeepSeek Harness (2.8 MB APK, no WebView)
Built a small native Android client for DeepSeek Harness (DSH) over the weekend because using it from a mobile browser was painful. Pure Kotlin + Jetpack Compose, no WebView, ~2.8 MB APK, MIT licensed.
A few implementation details:
- Custom Compose Markdown/code rendering, collapsible reasoning traces, compact tool-call rows, and interactive question cards above the composer.
- OkHttp unary POST RPC + a single multiplexed remote.mux WebSocket stream (plus a read-only session/control stream so a dropped phone connection never stalls tool approvals on desktop).
- QR pairing with device credentials encrypted via Android Keystore (CredentialVault).
- Background notifications via WatchService when an agent turn finishes or asks a question, and AttachmentReader to downscale oversized photos (HEIC/50 MP -> <=2048px JPEG) without heavy media libs.
- Built-in offline Demo mode behind the same DshApi interface so you can poke around the UI without setting up a host.
Repo: https://github.com/bekov001/dsh-android
Curious how folks here keep Compose recompositions low during fast token streaming and handle imePadding() cleanly across OEM keyboards.
1
Upvotes
1
u/FeelingFlamingo9387 3h ago
Very clean footprint at 2.8 MB. For fast token streaming without recomposition storms, two patterns have worked well for me in Compose:
LazyColumnremain structurally identical and skipped.For
imePadding()across OEM skins (HyperOS, OneUI, ColorOS),enableEdgeToEdge()plusconsumeWindowInsets(innerPadding)fromScaffoldbefore applyingimePadding()on the bottom bar prevents double insets and jumpiness whenadjustResizeinteracts inconsistently across Android versions.Are you re-parsing the full active message string per delta right now, or slicing finished blocks incrementally?