Message, Justin's Android SMS app (architecture and decisions)
androidsmsmmskotlincomposeroomsqlcipherarchitecture
Message (com.message.app, repo ~/dev/message) is a native Android SMS/MMS app Justin uses as his daily default SMS app. This article records the stack, the design decisions behind it, and where it lives; the hard-won platform lessons have their own articles (linked below).
Stack
Kotlin, Jetpack Compose, Material 3, MVVM with domain/data/presentation layers, Room + SQLCipher, Hilt, Coroutines/Flow, Paging 3, WorkManager, Coil 3, type-safe Navigation Compose, kotlinx.collections.immutable, and pdu_alt (AOSP-derived MMS PDU code). Tests: JUnit 4, MockK, Robolectric; well over 1,000 unit tests.
Key decisions
- Kotlin, not Flutter: the SMS/MMS APIs are native anyway; platform channels would wrap everything.
- Room, not Realm: QKSMS's Realm use caused threading problems.
- SQLCipher with the key in the Android Keystore and no fallback to plaintext (crash instead). See SQLCipher on Android (keys, KDF cost, rekeying safely).
allowBackup=false(privacy), minSdk 26, targetSdk 35. Consequence: a reinstall loses all preferences and local-only data.- FTS4 search with sanitized MATCH input; soft delete (recycle bin).
- Sync preserves local-only fields; never blind upsert. See Syncing an SMS app with the Android telephony provider.
- Cleartext HTTP blocked by network security config; FileProvider restricted to the
pdu/andapk/subdirectories. - In-app updater with sha256 verification. See In-app updates for sideloaded Android apps.
Deployment
./deploy.shchecks the git tag does not exist, requires a CHANGELOG entry for the version, builds the release APK, uploads to/var/www/html/com/releases/vX.Y.Z/, writesversion.jsonwith the sha256, flips the/var/www/html/com/appsymlink (keeps 5), deploys the PHP API (api.tldrcom.com), and pushes the tag but not the branch (push it yourself)../deploy.sh rollback <ver>and./deploy.sh listexist.- Because the Apache DocumentRoot is the symlink itself, public URLs are at the domain root:
https://tldrcom.com/message.apk,/message-debug.apk,/version.json. - Signing keystore
app/message-release.jks, passwords in gitignoredlocal.properties. - GitLab project id gotcha: a CI check hardcoded in a shared skill pointed at a different project (the
runrepo); the message repo has no CI pipelines.
Cross-repo features
Kid mode (an allowlist for texting) originated in the kid-phone project (~/dev/phone) but lives in Message, which owns the SMS surface. Justin later did not recognize it ("There is no kid mode"). Lesson: when one repo's work lands features in another, say so explicitly in reports and changelogs and record it in both projects' memory.
Related articles
- Sending MMS from an Android SMS app, Receiving MMS as the default SMS app, Testing SMS and MMS with one phone
- Android notifications and PendingIntent pitfalls, Unknown-sender quarantine and OTP exemptions for SMS, SMS reactions (tapbacks) across iPhone, Google Messages and Android apps
- Android app cold-start performance and process death, Android unit and instrumentation testing gotchas, Room database pitfalls on Android
- Locking down an Android phone with a device-owner app, GIF search behind a server proxy (Tenor shutdown, GIPHY, MMS size budgets), Making a Jetpack Compose app feel premium