Android app and APK optimization
How the native Android client handles playback, downloads, UI, and release packaging.
Native player and shared output
Music Box for Android uses Jetpack Compose for its phone and tablet UI and Media3 ExoPlayer for local playback. A foreground playback service and MediaSession support notification and system controls. The app can act as the selected output or control another output. Shared handoffs coordinate ownership and position through the backend so an old output does not retain control indefinitely.
Streaming, downloads, and offline playback
The app can start playback from a stream while it prepares local media. Temporary audio supports playback and upcoming tracks. Explicit downloads are tracked separately through a local manifest and can be used offline. The download and playback code has checks for incomplete or wrong-length audio and can retry through another supported source.
Search, library, and lyrics
The Android client has debounced suggestions, song-focused result ranking, discovery screens, and artist, album, and playlist views. It provides queue editing, repeat, shuffle, a sleep timer, and downloaded collections. The player can display synchronized lyrics when available, with fallback lyric sources and a timing adjustment.
What the release build optimizes
| Build setting | Effect |
|---|---|
| R8 minification with optimized ProGuard rules | Shrinks and optimizes release bytecode. Project keep rules preserve required runtime behavior. |
| Resource shrinking | Removes resources that the release build does not reference. |
| English locale filter | Limits packaged localized resources in this build configuration. |
| Packaging exclusions | Removes unused Kotlin and debug metadata from the artifact. |
| Dependency report settings | Excludes the optional dependency report from the APK and bundle. |
The source repository contains the installation and build instructions. Check its release notes for version-specific behavior. Use the project's published APK and keep the signing identity consistent for in-place updates.