Implement official QR login with encrypted sessions, recommendation/movie/bangumi tabs, TV focus navigation and Media3 playback controls. Include Gradle wrapper, preview tooling, privacy protections, tests and documented alpha validation limits.
1.6 KiB
1.6 KiB
Architecture
The application has one Android app module and no backend service.
MainActivityrenders Compose, collects lifecycle-aware state and coordinates overlay focus restoration.AppViewModelowns feed pagination/cache, cancellable detail/playback requests, visible-screen QR polling and serialized account transitions.AuthRepositoryuses the official web QR flow with an isolated in-memory attempt. Only a verified active attempt can atomically replace the durable account session.BiliHttpClientvalidates official HTTPS API destinations, scopes cookies per network hop, bounds response sizes and propagates coroutine cancellation to OkHttp calls.SessionStoreencrypts cookies with an Android Keystore AES-GCM key and writes an atomic file innoBackupFilesDir.ContentRepositoryretrieves official catalogue/details/playback responses;WbiSignercaches official signing material; pureContentJsonparsing separates format and entitlement checks from transport.BulubuluHome, dialogs andTvActionown TV layout/focus. Home stays composed beneath overlays, with focus/clicks disabled while inactive.PlayerScreencreates and releases Media3 with the composable lifecycle, merges separate AVC/AAC tracks and handles D-pad/media keys. CDN requests never receive account cookies.
There is no analytics, self-update service, local media scanning or private server. Login credentials and signed playback URLs must never appear in application logs or raw error messages. Account entitlements and region/DRM restrictions remain server-controlled. Tests use fake sessions in isolated storage and do not require a real account.