Skip to content

Scaffold the :wear application module (issue #276) - #280

Merged
mapitman merged 1 commit into
mainfrom
issue-276-wear-module-scaffold
Sep 2, 2026
Merged

mapitman merged 1 commit into
mainfrom
issue-276-wear-module-scaffold

Conversation

@mapitman

@mapitman mapitman commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Step 3 of #276 (see #278, #279 for steps 1-2). Adds a new standalone :wear Gradle module with its own Hilt Application/MainActivity, manifest (watch feature requirement, standalone meta-data so it runs without a paired phone — matches the target LTE watch), and launcher icon.

:wear depends on :core, so it picks up the existing Room database and settings DataStore Hilt modules for free — turns out no wear-specific database module is needed: the watch's own installed copy of AppDatabase never touches the phone's file regardless of matching filenames, since they're separate devices/separate app installs. This simplifies the original plan, which assumed a dedicated WearDatabaseModule would be needed.

Also adds PlayServicesWearSyncClient, the real DataClient-backed implementation of :core's WearSyncClient interface (from #279), bound via Hilt in WearSyncModule. Queue snapshots and position updates are wire-encoded into DataMap key/value pairs and round-tripped through the Data Layer API's putDataItem/listener callbacks.

Still not wired up to the phone side (step 4: the sync bridge + PhoneSyncListenerService), not backed by real playback (step 5), and the UI is a placeholder (step 6).

Test plan

  • ./gradlew assembleDebug testDebugUnitTest lintDebug passes across :app/:core/:wear
  • Created a Wear OS 6.0 emulator (none existed on this machine) and installed/launched the :wear debug build on it — confirmed MainActivity reaches state=RESUMED with no crash
  • Installed and launched :app's debug build on a phone emulator — confirmed no regression

Step 3 of Wear OS phase 1: a new standalone :wear Gradle module with
its own Hilt Application/MainActivity, manifest (watch feature
requirement, standalone meta-data so it runs without a paired phone,
matching the target LTE watch), and launcher icon. Depends on :core,
so it picks up the existing Room database and settings DataStore
Hilt modules for free -- no wear-specific database module needed,
since the watch's own installed copy of AppDatabase never touches
the phone's file regardless of matching filenames (separate device,
separate app).

Adds PlayServicesWearSyncClient, the real DataClient-backed
implementation of :core's WearSyncClient interface (added in the
previous PR), bound via Hilt in WearSyncModule. Queue snapshots and
position updates are wire-encoded into DataMap key/value pairs and
round-tripped through the Data Layer API's putDataItem/DataClient
listener callbacks.

Installed and launched the debug build on a newly created Wear OS 6.0
emulator (mycasts_wear_test) to confirm it actually boots -- confirmed
MainActivity reaches state=RESUMED with no crash. Still not wired up
to the phone side (step 4: the sync bridge and PhoneSyncListenerService)
or backed by real playback (step 5) or a real UI (step 6).
@mapitman
mapitman merged commit 1f4f6ae into main Sep 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant