Linux Format



To borrow a couple of words from Wayne’s World, using the most excellent Buildozer tool, it is possible to create APK files that can be used on Android devices and uploaded to the Play Store. Open a terminal and run the following commands:

$ pip3 install --upgrade buildozer $ sudo apt update $ sudo apt install -y git zip unzip openjdk-17-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses­5-dev libncurses­w5dev libtinfo5 cmake libffi-dev libssl-dev $ pip3 install --upgrade Cython==0.29.33 $ buildozer init

With these commands, we have installed Buildozer and the necessary dependenci­es. When Buildozer runs, it helpfully installs any parts of the Android SDK that are required. Following the initialisa­tion of the Buildozer project, you now need to edit the buildozer.spec file. Edit the title, and package. domain to match the details of the applicatio­n and who has created it (using the domain name in reverse format). Requiremen­ts should include plyer as well as python3 and kivy. The orientatio­n line should all ow portrait and landscape, so that the applicatio­n rerenders when the phone is turned around. The android.permission­s line needs to contain android.permission. VIBRATE, otherwise the applicatio­n crashes when the buttons are pressed. Finally, source.include_patterns should be set to images/*.png, so the images are included and the buttons render correctly.

Once the command has been entered and the run is completed, an APK file is generated within the bin folder. Buildozer also attempts to copy the APK to a connected phone, using the

USB debug capabiliti­es.

 ?? ?? Android debug options to allow debugging and app installati­on via USB.
Android debug options to allow debugging and app installati­on via USB.

Newspapers in English

Newspapers from Australia