Android and Android TV
Build
Two variants, Android 14 minimum: phone (Python 3.13, arm64-v8a) and TV (Python 3.11, armeabi-v7a and arm64-v8a); x86_64 only in emulator builds. Chaquopy provides armeabi-v7a only up to Python 3.11, so the backend stays compatible with 3.11.
ffmpeg and ffprobe are bionic NDK binaries (libffmpeg.so, libffprobe.so, 16 KB pages, legacy packaging so they are extracted). A static glibc binary is killed by seccomp (SIGSYS): never try again.
versionCode is the number of commits: Android refuses a downgrade from Canary to Beta or Stable, and the backend refuses it before download. The signing key is kept outside the repository; signing secrets live only in the android-signing environment of GitHub; v4 signing is off.
Runtime
Database, logs and thumbnails on internal storage, media on external storage (the database on FUSE blocked the event loop). restart_services() exits and relies on START_STICKY, without guarantee. Clear text is allowed only to 127.0.0.1 and 127.0.0.2. The multicast lock is taken again on every network change. Back is intercepted on TV only. Volume is never reset by the page and stays with the system. On TV, MainActivity sets FLAG_KEEP_SCREEN_ON.
Some vendor skins ask, besides the battery exemption, for the battery setting of the app to be set to no restriction.
Pitfalls
| Pitfall | Rule or measure |
|---|---|
| startup | no Python or WebView before the first frame; on a Google TV device bindApplication went from 1 054 to 66 ms and launch from about 2 s to 0.4 s; WebView initialization (about 290 ms) remains on the main thread by nature |
| system animations off | every ValueAnimator stops dead: a progress indicator stays readable without motion |
| INSTALL_FAILED_USER_RESTRICTED | turn on install over USB in developer options |
| WebView debugging | on in debug builds only: on a Canary, measure with dumpsys and atrace |