@@ -6,9 +6,10 @@ this is a Kotlin/Glance reimplementation of the same contracts.
66
77## Status
88
9- This is a ** pipeline spike** : one interactive ** Loadpoint** widget, end-to-end.
10- It has ** not been compiled** yet — it needs ` expo prebuild ` + a real Android
11- build to verify (see below). Treat it as a foundation to iterate on.
9+ Five interactive home-screen widgets, end-to-end, with per-instance
10+ configuration and instant refresh: ** Loadpoint** , and forecast widgets for
11+ ** Solar / Price / CO₂ / Feed-in** . Verified with ` expo prebuild ` + a real local
12+ Android build (` ./gradlew assembleDebug ` / ` assembleRelease ` ).
1213
1314Done:
1415
@@ -19,22 +20,27 @@ Done:
1920- ` kotlin/ApiClient.kt ` — GET ` /api/state?jq=… ` + basic auth + POST actions, plus
2021 the ` Loadpoint ` model (mirrors ` ApiClient.swift ` / ` Loadpoint.swift ` ).
2122- ` kotlin/LoadpointWidget.kt ` — Glance widget + interactive mode buttons.
23+ - ` kotlin/ForecastWidget.kt ` / ` ChartRenderer.kt ` — the four forecast widgets,
24+ with a Canvas-drawn chart (mirrors ` ForecastWidget.swift ` ).
25+ - ** Per-instance config** : ` LoadpointWidgetConfigActivity.kt ` (pick server, then
26+ loadpoint) and ` ForecastWidgetConfigActivity.kt ` (pick server; Solar also gets
27+ an "adjust to real production" toggle). Selections persist per ` appWidgetId ` in
28+ ` WidgetConfig.kt ` , including a fallback queue for launchers (e.g. MIUI) that
29+ hand the configure Activity a different id than the one the widget binds with.
30+ - ** Immediate refresh on config/server change** : ` modules/evcc-widget ` (a small
31+ local Expo native module) exposes ` refresh() ` , called from
32+ ` utils/widgetRefresh.ts ` after ` widgetSync.ts ` writes the file — no need to
33+ wait for the periodic ` updatePeriodMillis ` tick.
2234- ` kotlin/Theme.kt ` — brand colors / text styles.
2335- ` scripts/androidWidget/withAndroidWidget.ts ` — Expo config plugin: injects the
24- Kotlin, the ` res/xml ` widget info, the manifest ` <receiver> ` , and the
25- Glance/Compose gradle wiring. Registered in ` app.config.ts ` .
36+ Kotlin, the ` res/xml ` widget info, the manifest ` <receiver> ` / ` <activity> `
37+ entries, and the Glance/Compose gradle wiring. Registered in ` app.config.ts ` .
2638
2739Not done yet (follow-ups for parity with iOS):
2840
29- - ** Per-instance config** (pick server + loadpoint). iOS uses App Intents; Android
30- needs a widget ** configuration Activity** . The spike uses the default server and
31- ` loadpoints[0] ` .
32- - ** The other 5 widgets** (Solar / Price / CO₂ / Feed-in forecasts).
33- - ** Immediate refresh on config change** — ` widgetSync.ts ` only writes the file;
34- pushing an instant update from RN needs a tiny native module calling
35- ` LoadpointWidget().updateAll(context) ` . Today the widget refreshes on its own
36- schedule (` updatePeriodMillis ` , 30 min floor) / after a mode change.
37- - Localization (` .xcstrings ` → ` strings.xml ` ), size variants, full visual parity.
41+ - Localization (` .xcstrings ` → Android string resources) — widget text is
42+ currently hardcoded English in the Kotlin.
43+ - Size variants, full visual parity with the iOS widgets.
3844
3945## Build / test
4046
0 commit comments