From 5fceff4452a154166428f41f5a59d09846aad397 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Sat, 2 Nov 2013 22:31:22 +0000 Subject: [PATCH] Tweaked apk build doc, and added buildozer section --- doc/sources/guide/packaging-android.rst | 72 ++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 7 deletions(-) diff --git a/doc/sources/guide/packaging-android.rst b/doc/sources/guide/packaging-android.rst index ec66939c1..e9b958474 100644 --- a/doc/sources/guide/packaging-android.rst +++ b/doc/sources/guide/packaging-android.rst @@ -3,18 +3,22 @@ Create a package for Android ============================ + +You can create a package for android using the `python-for-android +`_ project. This page explains how to +download and use it directly on your own machine (see +:ref:`Packaging your application into APK`), use the prebuilt :ref:`testdrive` virtual +machine image, or use the :ref:`buildozer` tool to automate the entire +process. You can also see :ref:`Packaging your application for Kivy Launcher` to run kivy +programs without compiling them. + .. _Packaging your application into APK: -TestDrive ---------- - -There is a VirtualBox Image we provide with the prerequisites along with -the Android SDK and NDK preinstalled to ease your installation woes. You can -download it from `here `_. - Packaging your application into an APK -------------------------------------- +This section describes how to download and use python-for-android directly. + You'll need: - A linux computer or virtual machine @@ -128,6 +132,60 @@ http://developer.android.com/guide/publishing/app-signing.html The release binary will be generated in bin/KivyTouchtracer-1.1.0-release-unsigned.apk (for the previous touchtracer example.) +.. _testdrive: + +TestDrive +--------- + +We provide a VirtualBox Image with python-for-android along with +the Android SDK and NDK preinstalled to ease your installation woes. You can +download it from `here `_. + +Once the VM is loaded, you can follow the instructions from +:ref:`Packaging your application into APK`. You don't need to download +with `git clone` though, as python-for-android is already installed +and set up in the virtual machine home directory. + +.. _Buildozer: + +Buildozer +--------- + +Buildozer is a tool that automates the entire build process. It +downloads and sets up all the prequisites for python-for-android, +including the android SDK and NDK, then builds an apk that can be +automatically pushed to the device. + +Buildozer currently works only in Linux, and is an alpha +release, but it already works well and can significantly simplify the +apk build. + +You can get buildozer at ``_:: + + git clone https://github.com/kivy/buildozer.git + cd buildozer + sudo python2.7 setup.py install + +This will install buildozer in your system. Afterwards, navigate to +your project directory and run:: + + buildozer init + +This creates a `buildozer.spec` file controlling your build +configuration. You should edit it appropriately with your app name +etc. You can set variables to control most or all of the parameters +passed to python-for-android. + +Afterwards, plug in your android device and run:: + + buildozer android debug deploy run + +to build, push and automatically run the apk on your device. + +You can check the buildozer README at +``_ for more documentation of +buildozer's capabilities. + .. _Packaging your application for Kivy Launcher: Packaging your application for the Kivy Launcher