Files
XQKqueue/.project-docs/10-decisions/adr-001-native-android-display.md

1.6 KiB

ADR-001: Native Android large-screen application

Status

Accepted

Date

2026-08-12

Context

The browser display worked on general computers but remained unreliable on the target Android television hardware because WebView and browser media behavior varied by vendor. The user approved replacing the APK's WebView presentation with native Android pages while retaining the service's public display APIs.

Decision

The dedicated Android app renders its overview and project screens with Android Views and directly polls the public display API. It does not load the web application. The overview polls every five seconds and cannot create announcement state. A project screen polls its snapshot every three seconds and uses that same response for both UI and announcement detection.

Rationale

This removes System WebView from the appliance runtime path, makes remote-control focus and lifecycle behavior explicit, and keeps the Go service as the authoritative source without duplicating queue rules in the app.

Consequences

  • Browser and Android presentation code are separate and must both be maintained.
  • The Android app depends on the public overview and snapshot DTOs.
  • Hardware-specific layout, audio routing, orientation, and lifecycle behavior still require target-device acceptance.

Supersedes

  • The previous Android WebView wrapper design.
  • android/app/src/main/java/cn/nianxx/queue/display/MainActivity.java
  • android/app/src/main/java/cn/nianxx/queue/display/DisplayApiClient.java
  • .project-docs/50-evidence/topics/20260811-native-display-f2456ea9__public-display-api.md