event-tracker/android/buildozer.spec
AI_Assistant d7e5569dda
Add GPL-3.0 LICENSE, port update checker from android-app-template
LICENSE: verbatim copy of android-app-template's (official SPDX text,
not retyped) — GPL-3.0 as previously decided.

Update checker: check_latest_release()/download_and_install()/
MessagePopup ported from the template, wired to a new "Check for
Updates" button next to Settings. Requires certifi added to
p4a-recipes/kivy's python_depends (HTTPS on Android needs an explicit
CA bundle) and INTERNET/REQUEST_INSTALL_PACKAGES added to
buildozer.spec. FORGEJO_TOKEN at the top of main.py ships blank —
update checking is inert until it's set to a repo-scoped read-only
token. download_and_install() is the standard p4a pattern but not yet
verified on real hardware, same caveat as the template it came from.

Dropped the previously-agreed config.json split (event list vs. data
path) — decided it's not needed after all.
2026-08-22 13:31:03 +00:00

54 lines
2.4 KiB
INI

[app]
title = Event Tracker
package.name = eventtracker
package.domain = net.tastech
source.dir = .
source.include_exts = py
version = 0.1
requirements = python3,kivy
# Upstream p4a's kivy recipe declares python_depends on requests/certifi/
# chardet/idna/urllib3/filetype — mostly kivy.network.UrlRequest extras we
# never call, EXCEPT filetype (kivy/core/image imports it directly for
# real, confirmed by a startup crash when it was dropped too) and certifi
# (needed by main.py's update checker for HTTPS on Android — see the
# comment on check_latest_release() in main.py). p4a-recipes/kivy is a
# copy of that recipe keeping only those two. It's not just cleanup:
# requests pulls in charset-normalizer, whose newest release ships an
# Android-tagged wheel; p4a's dependency resolver pins that exact wheel
# into requirements.txt, then installs it with a plain host pip that has
# no idea it's an Android wheel, and the build dies on "not a supported
# wheel on this platform". Dropping the unused requests chain avoids the
# bug entirely — filetype and certifi are both pure Python with no such
# transitive dependency and install cleanly on their own.
#
# Reminder: editing p4a-recipes/kivy's python_depends alone doesn't take
# effect on an existing build — p4a caches the built dist by name+recipe
# list and won't re-derive python_depends for a dist that already
# exists. Delete .buildozer/android/platform/build-<arch>/dists/eventtracker
# after any python_depends change, or the change silently won't apply.
# See CLAUDE.md for the full trace of this gotcha.
p4a.local_recipes = p4a-recipes
orientation = portrait
fullscreen = 0
# READ/WRITE/MANAGE_EXTERNAL_STORAGE: broad file access is required to
# reach whatever folder FolderSync/DAVx5 is syncing into — that folder is
# picked by the user at runtime (Settings), not fixed at build time, so
# scoped storage APIs alone aren't enough. INTERNET: the in-app update
# checker (main.py) needs this to reach Forgejo's API and download a
# release .apk. REQUEST_INSTALL_PACKAGES: lets Android prompt to install
# that downloaded .apk in one tap instead of also making the user
# manually enable "install unknown apps" first.
android.permissions = READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE,MANAGE_EXTERNAL_STORAGE,INTERNET,REQUEST_INSTALL_PACKAGES
android.api = 33
android.minapi = 24
android.archs = arm64-v8a
[buildozer]
log_level = 2
warn_on_root = 1