Skip to content
Public template

About

Template for packaging PyDevices CPython applications as Android APKs with Buildozer and python-for-android.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

android-template

android-template is a starter for your own Android app made with the PyDevices 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 PyDevices desktop packages from TestPyPI 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:

./build_android.sh -y

Prerequisites, installing on an emulator or phone, and what to change are in the docs.

Docs · Examples · Roadmap

Made by PyDevices.

About

Template for packaging PyDevices CPython applications as Android APKs with Buildozer and python-for-android.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages