You need a copy of the template, then the app in p4a_app/main.py and the
settings in p4a_app/buildozer.spec. If you only want to run a script on a
phone or emulator, you don't need this repository: download android.py and
follow its guide.
Press Use this template on the android-template page, or clone it:
git clone https://github.com/PyDevices/android-template my-app
cd my-appBefore a full Android build, draw the demo on your computer. The script makes a virtual environment, installs the PyDevices desktop packages from TestPyPI and draws the demo once under Xvfb (a virtual display, so no window opens), then exits:
./scripts/test_desktop.shIt needs xvfb-run (the xvfb package on Ubuntu).
- Change
p4a_app/main.pyto your own PyDevices code. - Set
title,package.nameandpackage.domaininp4a_app/buildozer.spec. The template's id isorg.pydevices.myapp; make yours unique before you give the APK to anyone. - Replace
p4a_app/icon.png. Change the icon has the size. - Build and install it: Build an APK, then Run it on an emulator or a phone.
What to change, and where lists every setting you are likely to touch.