Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.62 KB

index.md

File metadata and controls

43 lines (32 loc) · 1.62 KB

Make your first app

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.

Use the template

Press Use this template on the android-template page, or clone it:

git clone https://github.com/PyDevices/android-template my-app
cd my-app

Try it on your desktop

Before 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.sh

It needs xvfb-run (the xvfb package on Ubuntu).

Make it yours

  1. Change p4a_app/main.py to your own PyDevices code.
  2. Set title, package.name and package.domain in p4a_app/buildozer.spec. The template's id is org.pydevices.myapp; make yours unique before you give the APK to anyone.
  3. Replace p4a_app/icon.png. Change the icon has the size.
  4. 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.