Dashboard URL and label configured in dashboards.yaml; each entry becomes a product flavor with BuildConfig.DASHBOARD_URL injected at build time. APKs output as <flavor>-release.apk.
This commit is contained in:
@@ -1,23 +1,47 @@
|
||||
# android-webview-kiosk
|
||||
|
||||
Fullscreen WebView kiosk for Android TV. Shows the house Grafana dashboard:
|
||||
<https://grafana.c3c.cz/public-dashboards/381fe3e71e164eb99dd0b10e246a36e2>
|
||||
Fullscreen WebView kiosk for Android TV. Shows configurable Grafana dashboards
|
||||
defined in `dashboards.yaml`. Target device: Sony Bravia KD-65XE9305 (Android 8.0).
|
||||
Built for remote launch via the Bravia REST IP-control API, driven by Control4.
|
||||
|
||||
Target device: Sony Bravia KD-65XE9305 (Android 8.0). Built for remote
|
||||
launch via the Bravia REST IP-control API, driven by Control4.
|
||||
## Dashboards
|
||||
|
||||
Defined in `dashboards.yaml` at repo root:
|
||||
|
||||
```yaml
|
||||
weather:
|
||||
url: https://grafana.c3c.cz/public-dashboards/...
|
||||
label: Weather # shown in Bravia launcher
|
||||
|
||||
house_condition:
|
||||
url: http://grafana.c3c.cz/public-dashboards/...
|
||||
label: House Condition
|
||||
```
|
||||
|
||||
Each entry produces a separate APK. Names must be valid Gradle identifiers
|
||||
(letters, digits, underscores — no hyphens).
|
||||
|
||||
## Build
|
||||
|
||||
# all flavors
|
||||
nix develop --command gradle --no-daemon :app:assembleRelease
|
||||
|
||||
APK: `app/build/outputs/apk/release/app-release.apk`
|
||||
# single flavor
|
||||
nix develop --command gradle --no-daemon :app:assembleWeatherRelease
|
||||
|
||||
APKs: `app/build/outputs/apk/<flavor>/release/<flavor>-release.apk`
|
||||
|
||||
## Sideload
|
||||
|
||||
1. TV one-time: Settings → About → press *Build* 7× → Developer options →
|
||||
enable ADB debugging.
|
||||
2. `adb connect <tv-ip>:5555`
|
||||
3. `adb install -r app/build/outputs/apk/release/app-release.apk`
|
||||
3. `adb install -r app/build/outputs/apk/weather/release/weather-release.apk`
|
||||
|
||||
Fresh install (removing old app first):
|
||||
|
||||
adb uninstall cz.c3c.webviewkiosk
|
||||
adb install app/build/outputs/apk/<flavor>/release/<flavor>-release.apk
|
||||
|
||||
Upgrades: bump `versionCode` in `app/build.gradle.kts`, rebuild, reinstall
|
||||
with `-r`. Same committed keystore = no uninstall needed.
|
||||
|
||||
Reference in New Issue
Block a user