Skip to content

feat(android): Splash Screen API plumbing (Android 12+) #80

@ilmoniemi

Description

@ilmoniemi

User Story

As a Pyrycode mobile installer, I want a proper splash screen on app launch, so the app feels polished and matches platform conventions.

Context

Plan Phase 5 lists splash screen (Android 12+ Splash Screen API). The androidx.core:core-splashscreen compat library backports the same configuration surface to Android 6+, so a single setup covers all supported devices.

This ticket lands the plumbing only — dependency, splash theme, manifest wiring, MainActivity install call, and a minimal placeholder vector icon. No animation logic, no branded artwork, no timing hacks. Real branded splash (final icon + animated transition) is a deliberate follow-up to be filed once visual design lands.

The launch-time start-destination decision (Welcome vs. Channel List) was wired in #13 (closed) and must keep working unchanged — splash hands off to the existing NavHost.

Acceptance Criteria

  • App launches showing the splash on a brand-colored background with a placeholder vector icon, then transitions to the conditional start destination from feat(ui): conditional NavHost start destination based on paired-server-exists #13 (Welcome on fresh install, Channel List once pairedServerExists is true) with no visible flash, gap, or duplicate frame between splash and first screen.
  • No artificial timeout, sleep, or minimum-duration delay — the system controls when the splash dismisses.
  • ./gradlew assembleDebug and ./gradlew lint pass with no new warnings.
  • Manually verified on an Android 13+ emulator; PR body notes any Android 11/12 fallback behavior if an emulator was available for that range.

Technical Notes

The architect picks the exact mechanism, but the surface is well-known:

  • Add androidx.core:core-splashscreen via gradle/libs.versions.toml and reference it from app/build.gradle.kts.
  • Define a Theme.SplashScreen style in res/values/themes.xml with windowSplashScreenAnimatedIcon pointing at a new placeholder vector drawable, and windowSplashScreenBackground set to a brand color from colors.xml.
  • Set the launcher <activity> theme in AndroidManifest.xml to the splash theme (the application-level theme stays as today's Theme.PyrycodeMobile, which the activity switches to via installSplashScreen()).
  • Call installSplashScreen() in MainActivity.onCreate before super.onCreate(...).

Out of Scope

Figma

N/A — placeholder vector icon on brand color; real branded splash (final mark + transition) is a deliberate follow-up to be filed under Phase 5 polish.

Size Estimate

S — one dependency wiring, one theme style, one new vector drawable, one manifest attribute, one MainActivity line. Coupled steps that produce a usable splash only when landed together; splitting would create unbuildable or empty-splash intermediate states.

Metadata

Metadata

Assignees

No one assigned

    Labels

    size:s<100 lines; default for non-trivial tickets

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions