android-template is a starter for your own Android app made with the OmniPython
display stack: your Python in p4a_app/main.py, built into an APK with
python-for-android and
Buildozer.
If you only want to run a script on a phone or emulator, you don't need an APK
of your own: use android.py, which installs a prebuilt Runner
(how).
On GitHub, press Use this template, or clone it, then draw the demo on your desktop before you build anything for Android:
git clone https://github.com/PyDevices/android-template my-app
cd my-app
./scripts/test_desktop.sh== main.py: draw_demo() smoke (no event loop) ==
SDLDisplay: initialized.
smoke ok
Desktop smoke exited cleanly
That makes a virtual environment, installs the OmniPython desktop packages from
PyPI and draws main.py's four colour bands once under Xvfb. The APK is one
more command, which needs the Android SDK, NDK and a JDK. It also takes
lib/omip.py from an omnipython checkout beside this one, so clone
omnipython next to it first, or
point OMNIPYTHON_PRODUCT_ROOT at a checkout:
./build_android.sh -yPrerequisites, installing on an emulator or phone, and what to change are in the docs.
Made by PyDevices.