Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / watch-wear / AGENTS.md

AGENTS.md1.6 KiBRenderedCodeRaw
1# AGENTS.md — watch-wear/ (':watch:wear')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside
4> `watch-wear/` + `watch/` (the phone side of the same app).
5
6- Gradle: :watch:wear (dir watch-wear/) / dir: watch-wear/ (convention: `common-conventions-wear`)
7- Package roots present: ui, platform, service
8- Entry file: ui/WearMainActivity.kt
9
10## Why this module exists (read before changing identity)
11Watch half of the Watch conduit — the sole phone<->watch messaging
12app on the watch. It deliberately uses
13`applicationId = "com.vayunmathur.watch"` (the phone app's) with the
14shared dev/release signing: the WearLink handshake token and the
15`com.vayunmathur.watch.permissions.CONDUIT` signature permission both
16require the same signing certificate on both sides. It is the only
17watch app that holds Bluetooth permissions and the only one that owns
18a real `WearLinkNode` (appId `watch_conduit`, in
19`service/ConduitService` via `ConduitHost` in `:library:wearlink`).
20Every other watch app reaches the phone through `WearLinkClientNode`.
21
22## Conduit
23- Local clients: signature-permission Messenger bound service
24 (`service/ConduitService`, foreground `connectedDevice`), restarted
25 by `platform/BootReceiver` on boot/replacement.
26- Routing/protocol: `com.vayunmathur.library.wearlink.conduit` in
27 `:library:wearlink`, shared with `:watch`; route key is the first
28 path segment.
29- The status screen renders `ConduitRuntime.state` (link state,
30 registered apps, per-app counters).
31
32## Verify (this module only)
33```
34./gradlew :watch:wear:assembleDev
35./gradlew :watch:wear:testDebugUnitTest
36```