replica(messages): recon, features, architecture, tokens

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-17 16:49:43 +02:00
co-authored by Claude Opus 5.5
parent 612c017c2b
commit 2f1ddd0ff0
11 changed files with 211 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# Architecture: Messages (Android, ohne Google)
Same conventions as the others; **no network permission** (SMS goes through the radio, not the internet).
| Schicht | Wahl | warum |
| --- | --- | --- |
| UI | Compose, M3 Expressive, dynamic colour | same as the others |
| Rolle | `RoleManager.ROLE_SMS` | only the default SMS app may write the SMS provider and receives SMS_DELIVER |
| Empfangen | `SMS_DELIVER` receiver (BROADCAST_SMS), joins multipart PDUs, inserts into `Telephony.Sms.Inbox` | default app duty |
| MMS-Pflicht | `WAP_PUSH_DELIVER` receiver (accepted, stored later with MMS support) | required for the role |
| Senden | `SmsManager.divideMessage` + `sendMultipartTextMessage` with sent/delivered PendingIntents; row in outbox → sent/failed | status updates in the provider |
| Antwort ohne UI | `RESPOND_VIA_MESSAGE` service (SEND_RESPOND_VIA_MESSAGE) | phone app "decline with message"; required for the role |
| Daten | system provider via ContentResolver + ContentObserver | no copies |
| Kontakte | PhoneLookup, same helper as Telefon | |
Data: no own schema (DataStore for settings).
Bites: multipart and encoding, dual SIM (`SubscriptionManager`), status callbacks after process death (receiver updates by message id), notification grouping per thread, short codes and alphanumeric senders (no reply possible).
Build order: role + receive + list → conversation + send + status → notifications with reply → new chat, search, archive, delete → MMS.