Plexamp Lite 1.14: Android 4.1 build with ExoPlayer, lyrics, home-screen widget

- One build per Android level, as in Tenda: build/PlexampLite.apk (Android 2.2+, versionCode 1508) and
  build/PlexampLite-api16.apk (Android 4.1+, 1516), from shared src/ plus platform/api8 or platform/api16.
- Android 4.1 build: ExoPlayer 2.18.7 behind a small Engine interface (gapless hand-over to read-ahead and
  downloaded files, a longer buffer, MediaPlayer fallback for tracks it can't decode), a notification and
  lock screen with art and buttons, a resizable widget, Holo, a menu button without a Menu key, metered networks.
  R8 shrinks ExoPlayer and Guava (tools/fetch_exoplayer.sh, tools/r8-rules.pro).
- Both builds: lyrics in Now Playing as in the Mac app (timed lyrics follow and seek), a home-screen widget,
  media play/pause keys, the moon icon drawn without clipPath.
- PlexampLite-noreport on the SD card stops play reports, for tests against a real server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
XoséandClaude Opus 5.5 committed 2026-11-01 18:41:26 +01:00
1 parent 2e7476669e
commit 13f29e26c4
39 files changed
+1685 -119

No files matched your search

+22 -8
View File
@@ -11,13 +11,14 @@ over a Bluetooth speaker.
## Target and hard limits
- Samsung Galaxy Mini GT-S5570: Android 2.2/2.3 (API 8), 240×320 ldpi, 600 MHz ARMv6, 384 MB RAM; any 2.2+
phone.
- Native Java (this app uses XML layouts), no libraries beyond the bundled Bouncy Castle TLS.
phone. A second build for Android 4.1+ (API 16: Xperia J, Galaxy S II), one per Android level, never per phone.
- Native Java (this app uses XML layouts), no libraries beyond the bundled Bouncy Castle TLS; the Android 4.1 build
adds ExoPlayer 2.18.7 (+ Guava), shrunk by R8.
- Galician by default, English in Settings. All text in `tools/strings.py`, which generates
`res/values*/strings.xml`. The connection log stays in English.
- Plays MP3/AAC/Vorbis directly; FLAC, ALAC and the rest are transcoded to MP3 by the server.
## Current scope (1.13)
## Current scope (1.14)
- Sign in with a plex.tv/link PIN (or a manual address + token). Owned and shared servers and libraries.
- Connection picking: last good one first, then LAN HTTP, LAN HTTPS (`plex.direct`), remote HTTPS, Relay
@@ -27,11 +28,17 @@ over a Bluetooth speaker.
recovery (re-pick, then download first), resume after short Bluetooth drop-outs.
- Home radios and shelves, Artists/Albums/Playlists, Search, artist/album/playlist pages, Now Playing, Up
Next queue (survives restarts), sleep timer, love, downloads to SD card with offline play reporting.
- Headset and Bluetooth buttons; pauses for calls and unplugging. Plays reported to Plex.
- Headset and Bluetooth buttons; pauses for calls and unplugging. Plays reported to Plex (not while
`PlexampLite-noreport` is on the SD card: for tests against a real server).
- Lyrics in Now Playing (as in the Mac app): a lasting on/off; timed lyrics follow and seek; plain text scrolls.
- Home-screen widget (both builds).
- Android 4.1 build: ExoPlayer with gapless hand-over to read-ahead/downloaded files, notification and lock screen
with art and buttons, resizable widget, Holo, ⋮ without a Menu key, metered networks.
## Out of scope
- Gapless playback and notification playback buttons (Android 2.x can't), video, photos.
- On the Android 2.x build: gapless playback and notification playback buttons (Android 2.x can't).
- Video, photos.
## Must not break
@@ -41,17 +48,24 @@ over a Bluetooth speaker.
- This repo's `tools/setup_toolchain.sh`, `make_roots.py` and `signapk.py` prepare the toolchain all the
Galaxy Mini apps use: changes there affect every app.
- Installs to internal storage (SD-card installs get killed during USB sharing).
- `platform/api8` and `platform/api16` keep the same `Platform` methods; shared code calls no API the API 8 jar
lacks (the api8 compile and Dalvik check catch it). Each build's `versionCode` is the manifest's × 100 + level,
same key; both APKs are listed in `../tenda-lite/repo/apps.json`.
- The Android 4.1 build targets API 16: no `clipPath` in drawing (the GPU can't before 4.3), and network on the
main thread is allowed in `Platform.init` (the shared code closes connections there).
## Code map
`PlayerService` (playback, recovery) · `PlayQueue` · `Downloads` · `plex/` (`Plex`, `Server`, `Library`,
`PlayerService` (playback, recovery, gapless) · `Engine` (`MediaPlayerEngine`; `ExoEngine` in platform/api16) ·
`Platform` (per level) · `PlayerWidget` + `PlayerViews` · `Lyrics` + `LyricsView` + `util/Lrc` · · `PlayQueue` · `Downloads` · `plex/` (`Plex`, `Server`, `Library`,
`Item`) · `net/` (`Http`, `CertVerifier`, `StreamProxy`, `Threads`, `DiagLog`) · activities Home, Browse,
NowPlaying, Queue, Search, Setup, Downloads.
## Build, test, release
- `tools/setup_toolchain.sh` once, then `./build.sh` → `build/PlexampLite.apk`.
- Tests on the desktop JVM: `PlexTest` with `test/mock_plex.py`, `QueueTest`, `PreferHomeTest` with
- `tools/setup_toolchain.sh` and `tools/fetch_exoplayer.sh` once, then `./build.sh` → `build/PlexampLite.apk`
and `build/PlexampLite-api16.apk`.
- Tests on the desktop JVM: `PlexTest` with `test/mock_plex.py`, `QueueTest`, `LyricsTest`, `PreferHomeTest` with
`test/identity_server.py`, `NetTest`, `HandshakeProfile`.
- Release: raise `versionCode`/`versionName`, build, add `changes` in `../tenda-lite/repo/apps.json`, commit
and push, `../tenda-lite/repo/publish.sh`.