- One build per Android level, as in Tenda and Plexamp Lite: build/Podlite.apk (Android 2.2+, versionCode 1308) and build/Podlite-api16.apk (Android 4.1+, 1316), from shared src/ plus platform/api8 or platform/api16; build.sh now runs on the local toolchain (aapt2, dx or R8, signapk.py; the JKS key converted for the run). - Android 4.1 build: ExoPlayer 2.18.7 behind an Engine interface, with playback speed (player header) and skipping silences (Settings), a 3-minute buffer and MediaPlayer as fallback for audio it can't decode; a notification and lock screen with the cover and buttons; Holo; a menu button on phones without a Menu key; metered networks for "download on Wi-Fi only". - Both builds: tlskit's Http.abort fix (a finished response's pooled connection is no longer closed under a later request); the lock screen's and newer headsets' play/pause keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.5 KiB
3.5 KiB
Podlite (Android) — spec
The short contract for working on this app. README.md is the user guide; this file says what the app is
for, what limits it lives within, and what must not break.
Goal
A small Audiobookshelf podcast client for the Samsung Galaxy Mini whose progress stays in sync with the server and other apps.
Target and hard limits
- Samsung Galaxy Mini GT-S5570 and other Android 2.2+ phones (API 8), 240×320 ldpi.
- Native Java, no libraries beyond the bundled TLS stack. All sizes in
res/values/dimens.xml. - Galician interface; warm dark colours with an amber accent (from the radio icon).
Current scope (1.12)
- Login with user/password (refreshes 2.26+ short-lived tokens; older servers' long-lived token) or an API key.
- HTTP on the LAN; bundled TLS 1.2 for
https://(Mozilla roots); other certificates shown by fingerprint, trusted once (trusting the issuing CA so renewals work), forgettable in Settings. - Loopback stream proxy for HTTPS, forwarding seeks with a fresh token per request.
- Tabs: Latest (continue listening + newest), Shows, Saved (SD-card downloads, Wi-Fi only by default).
- Player: skip back/forward (amounts in Settings), seek, show notes, sleep timer, mark played, close.
- Progress sync every 15 s and on pause; offline positions sent later.
- Headset buttons; pauses for calls and unplugging.
Android 4.1 build
build/Podlite-api16.apk(minSdk/targetSdk 16) next tobuild/Podlite.apk(API 8): sharedsrc/, per-levelplatform/api8|api16/…/Platform.javawith the same methods,platform/api16/resoverlaid. ExoPlayer with speed and skip silences, notification and lock screen with cover and buttons, Holo, ⋮ without a Menu key, metered networks.
Out of scope
- Audiobooks, HLS/transcoded streams (so no Opus); playback speed on Android 2.x (it can't).
Must not break
- An episode only counts as played within a minute of its real end; drop-outs and cut files are retried or reported, never marked played. A stall of 12 s is reported.
- Package
com.miniabsandminiabs.keystore(passwordminiabs): updates install over MiniABS. src/com/miniabs/net/is a copy oftlskit: change it in../tlskitand reinstall.platform/api8andplatform/api16keep the samePlatformmethods; shared code calls no API the API 8 jar lacks (the api8 compile and Dalvik check catch it). Each build'sversionCodeis 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: network on the main thread is allowed in
Platform.init; keep the desktop tests' files (Util,Api…) free ofPlatform. - Installs to internal storage.
Code map
Api · PlayerService · StreamProxy · DownloadService / Downloads · Trust / TrustPrompt · Prefs ·
activities Home, Podcast, Player, Login, Settings · net/ tlskit · tools/make_icons.py, translate_gl.py.
Build, test, release
ANDROID_JAR=/path/to/android-8/android.jar ./build.sh(JDK, aapt, dx, zipalign, apksigner,BC_SRC).JSON_JAR=… test/run_tests.sh: API, JSON, progress, HTTPS trust and proxy againsttest/mock_abs.py, with good, expired, wrong-host, forged and self-signed certificates (test/make_pki.sh).- Release: raise
versionCode/versionName, build, addchangesin../tenda-lite/repo/apps.json, commit and push,../tenda-lite/repo/publish.sh. - Siblings:
podlite-ios,podlite-mac; behaviour fixes are backported between them.