22
33This repo includes a standalone Android companion app under ` android/ ` that powers home-screen widgets backed by Chronicle plan data.
44
5+ ![ widget] ( https://github.com/user-attachments/assets/7132c09c-7db5-412a-9932-f2413133321a )
6+
7+
58## What It Does
6- - Fetches ` GET /plan/today.json ` .
7- - Schedules a WorkManager background sync every ** 61 minutes** .
9+ - Fetches ` GET /plan/today.json ` to get today's Planned Run .
10+ - Backend Schedules a WorkManager background sync every ** 61 minutes** .
811- Supports on-demand refresh from widget/action tap.
912- Provides two widget types:
1013 1 . ` 1x1 ` miles-only tile (Chronicle icon background + large miles text).
1114 2 . Resizable today-detail widget (miles, run type, workout shorthand if present).
1215- Tapping widget content opens Chronicle ` /plan ` .
1316
1417## Chronicle API Contract
15- The widget app expects :
18+ ` GET /plan/today.json ` provides :
1619
1720``` json
1821{
@@ -23,22 +26,13 @@ The widget app expects:
2326}
2427```
2528
26- ` workout_shorthand ` is optional.
27-
28- ## Build / Install
29- 1 . Open ` android/ ` in Android Studio (Giraffe+ recommended).
30- 2 . Let Gradle sync and install required SDK components.
31- 3 . Connect a device/emulator and run the ` app ` module.
32- 4 . Add either Chronicle widget from the home-screen widget picker.
29+ ` workout_shorthand ` is dependant on ` SOS ` run type.
3330
3431## Configure Base URL
3532The launcher app (` Chronicle Widget ` ) contains a simple base URL setting.
36- - Example LAN URL: ` http://192.168.1.9:8777 `
37- - Emulator default remains ` http://10.0.2.2:8777 `
38-
39- Save, then tap ** Refresh Widgets Now** .
33+ - Set Chronicle's LAN URL ex. ` http://192.168.1.90:8080 `
34+ - Save, then tap ** Refresh Widgets Now** .
4035
4136## Notes
4237- WorkManager enforces a minimum interval; 61 minutes is honored.
43- - Widget update period is ` 0 ` ; refreshes are fully worker-driven.
4438- If network fetch fails, widget falls back to last cached payload.
0 commit comments