2013-03-11 18:04:21 +00:00
|
|
|
.. _Kivy Launcher: https://play.google.com/store/apps/details?id=org.kivy.pygame&hl=en
|
2013-03-12 08:33:12 +00:00
|
|
|
.. _android:
|
2011-03-16 15:04:34 +00:00
|
|
|
|
|
|
|
Kivy on Android
|
|
|
|
===============
|
2011-02-03 03:07:30 +00:00
|
|
|
|
2013-03-11 18:04:21 +00:00
|
|
|
Kivy runs on Android, but you need a phone with:
|
2011-10-14 14:24:57 +00:00
|
|
|
|
|
|
|
* SD Card
|
|
|
|
* OpenGL ES 2.0 (Android 2.2 minimum)
|
|
|
|
|
2013-03-11 18:04:21 +00:00
|
|
|
Requirements for an Android application
|
|
|
|
---------------------------------------
|
2011-02-03 03:07:30 +00:00
|
|
|
|
2013-03-11 18:04:21 +00:00
|
|
|
To create an application for the Android platform, you must have a
|
2012-03-09 14:56:59 +00:00
|
|
|
file named `main.py` in the root directory of your application.
|
|
|
|
|
2011-07-15 14:43:34 +00:00
|
|
|
Create an APK
|
|
|
|
-------------
|
2011-04-22 14:24:47 +00:00
|
|
|
|
2011-07-15 14:43:34 +00:00
|
|
|
The whole process is described in the :ref:`packaging_android` documentation.
|
2011-02-03 03:07:30 +00:00
|
|
|
|
2011-04-22 14:24:47 +00:00
|
|
|
|
2013-03-11 18:04:21 +00:00
|
|
|
Debugging your application on the Android platform
|
|
|
|
--------------------------------------------------
|
2011-04-22 14:24:47 +00:00
|
|
|
|
2013-03-11 18:04:21 +00:00
|
|
|
The `Android SDK <http://developer.android.com/sdk/index.html>`_ includes a tool named adb.
|
|
|
|
Connect your device, and run::
|
2011-04-22 14:24:47 +00:00
|
|
|
|
|
|
|
adb logcat
|
|
|
|
|
2013-03-11 18:04:21 +00:00
|
|
|
You'll see all the logs including your stdout/stderr, Kivy logger.
|
2011-04-22 14:24:47 +00:00
|
|
|
|
2013-03-11 18:04:21 +00:00
|
|
|
You can also run and debug your application using the `Kivy Launcher`_.
|
|
|
|
If you run your application this way, you will find log files inside the
|
|
|
|
"/.kivy/logs" sub-folder within your application folder.
|
2011-04-22 14:24:47 +00:00
|
|
|
|
2011-03-16 16:56:52 +00:00
|
|
|
Status of the Project
|
2011-02-03 03:07:30 +00:00
|
|
|
---------------------
|
|
|
|
|
2012-03-09 14:56:59 +00:00
|
|
|
The project is now stable, using `Python for Android
|
|
|
|
<http://github.com/kivy/python-for-android/>`_.
|
2011-02-03 03:07:30 +00:00
|
|
|
|
2012-03-09 14:56:59 +00:00
|
|
|
We made that project to be able to:
|
2011-02-03 03:07:30 +00:00
|
|
|
|
2013-03-11 18:04:21 +00:00
|
|
|
- create custom Python versions including only wanted modules
|
|
|
|
- handle multitouch events in Kivy
|
|
|
|
- create a python module for accessing features specific to Android
|
2012-03-09 14:56:59 +00:00
|
|
|
- handle sleep/wakeup properly
|
2011-02-03 03:07:30 +00:00
|
|
|
|
2011-03-16 16:56:52 +00:00
|
|
|
Tested Devices
|
|
|
|
--------------
|
|
|
|
|
2013-03-11 18:04:21 +00:00
|
|
|
These Android devices have been confirmed to work with Kivy. If your
|
2011-03-16 16:56:52 +00:00
|
|
|
device is not on the list, that does not mean that it is not supported.
|
2013-03-11 18:04:21 +00:00
|
|
|
If that is the case, please try running Kivy and if it succeeds, let us
|
2011-03-16 16:56:52 +00:00
|
|
|
know so that we can update this list. Note, however, that your device has
|
|
|
|
to support at least OpenGL 2.0 ES.
|
2011-02-10 16:04:26 +00:00
|
|
|
|
2011-04-22 14:24:47 +00:00
|
|
|
Phones
|
|
|
|
~~~~~~
|
|
|
|
|
2011-02-10 16:04:26 +00:00
|
|
|
- Motorola Droid 1
|
|
|
|
- Motorola Droid 2
|
2011-02-23 20:10:11 +00:00
|
|
|
- HTC Desire
|
2011-02-10 16:04:26 +00:00
|
|
|
- HTC Desire Z
|
|
|
|
- Xperia 10 (custom ROM 2.1 + GLES 2.0 support)
|
2012-04-08 08:27:46 +00:00
|
|
|
- LG Optimus S
|
|
|
|
- LG Optimus V
|
2013-03-11 18:04:21 +00:00
|
|
|
- Samsung Galaxy S (mostly works, seems to have some weird OpenGL behaviour, most notably the kivy splash screen doesn't work)
|
|
|
|
- Samsung Galaxy Note GT-N7000
|
2011-02-10 16:04:26 +00:00
|
|
|
|
2011-04-22 14:24:47 +00:00
|
|
|
Tablets
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
|
- Samsung Galaxy Tab
|
|
|
|
- Motorola Xoom
|
2011-05-19 13:20:23 +00:00
|
|
|
- Asus EeePad Transformer
|
2011-04-22 14:24:47 +00:00
|
|
|
|