8000 Changed launcher doc · yangjiu/python-for-android@20c1940 · GitHub
[go: up one dir, main page]

Skip to content

Commit 20c1940

Browse files
committed
Changed launcher doc
1 parent 048a734 commit 20c1940

File tree

2 files changed

+30
-84
lines changed

2 files changed

+30
-84
lines changed

doc/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Contents
3232
recipes
3333
bootstraps
3434
services
35-
launcher
3635
apis
3736
troubleshooting
37+
launcher
3838
contribute
3939
old_toolchain/index.rst
4040

doc/source/launcher.rst

Lines changed: 29 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -3,75 +3,28 @@
33
Launcher
44
========
55

6-
.. note::
7-
8-
This form of packaging creates an APK that allows quick and dirty testing
9-
of your android applications. Do not use in production!
10-
11-
.. warning::
12-
13-
Using the launcher in production gives the end-user easy access to your
14-
source code.
15-
166
The Kivy Launcher is an Android application that can run any Kivy app
177
stored in `kivy` folder on SD Card. You can download the latest stable
188
version for your android device from the
199
`Play Store <https://play.google.com/store/apps/details?id=org.kivy.pygame>`_.
2010

21-
The stable launcher comes with various packages usually listed in the
22-
description in the store. Those aren't always enough for an application to run
23-
or even launch if you work with other dependencies that are not packaged.
24-
25-
Permissions
26-
-----------
27-
28-
The stable launcher has these permissions:
11+
The stable launcher comes with various Python packages and
12+
permissions, usually listed in the description in the store. Those
13+
aren't always enough for an application to run or even launch if you
14+
work with other dependencies that are not packaged.
2915

30-
- ACCESS_COARSE_LOCATION
31-
- ACCESS_FINE_LOCATION
32-
- BLUETOOTH
33-
- INTERNET
34-
- READ_EXTERNAL_STORAGE
35-
- RECORD_AUDIO
36-
- VIBRATE
37-
- WRITE_EXTERNAL_STORAGE
38-
39-
.. |perm_docs| replace:: android documentation
40-
41-
.. _perm_docs:
42-
https://developer.android.com/guide/topics/security/permissions.html
43-
44-
Check the other available permissions in the |perm_docs|_.
45-
46-
Packages
47-
--------
48-
49-
The launcher by default provides access to these packages:
50-
51-
- audiostream
52-
- cymunk
53-
- docutils
54-
- ffmpeg
55-
- kivy
56-
- lxml
57-
- openssl
58-
- pil
59-
- plyer
60-
- pygments
61-
- pyjnius
62-
- pyopenssl
63-
- sqlite3
64-
- twisted
16+
The Kivy Launcher is intended for quick and simple testing, for
17+
anything more advanced we recommend building your own APK with
18+
python-for-android.
6519

6620
Building
6721
--------
6822

69-
To keep up with the most recent Kivy and be able to run more than one app
70-
without building over and over a launcher with kivy `master` branch together
71-
with additional packager most of your apps use are necessary. To build it
72-
you'll need pygame bootstrap (launcher is not available in sdl2 yet). To get
73-
the most recent versions of packages you need to clean them first, so that
74-
the packager won't grab an old package instead of fresh one.
23+
The Kivy Launcher is built using python-for-android, and is currently
24+
only supported by the pygame bootstrap (there is no SDL2 launcher
25+
yet). To get the most recent versions of packages you need to clean
26+
them first, so that the packager won't grab an old package instead of
27+
fresh one.
7528

7629
.. highlight:: none
7730

@@ -100,45 +53,39 @@ the packager won't grab an old package instead of fresh one.
10053
adding `main.py` or `main.pyo` to the app. The argument `--launcher` is
10154
above them and tells the p4a to build the launcher version of the APK.
10255

103-
The power of the launcher is in its capability to run multiple apps from
104-
source, which means the more packages you include, the more stable your
105-
installation will be and the less times you'll need to update it or do anything
106-
else with it except running apps. The necessary stuff is about 6 - 8MB big and
107-
additional packages won't increase the size that much, which is definitelly
108-
an advantage if there are more than two apps for testing.
109-
11056
Usage
11157
-----
11258

113-
Once the launcher is installed, you need to create a folder on your sdcard
114-
(`/sdcard/kivy`). Each new folder inside `kivy` represents a separate
115-
application.
116-
117-
::
59+
Once the launcher is installed, you need to create a folder in your
60+
external storage directory (e.g. ``/storage/emulated/0`` or
61+
``/sdcard``) - this is normally your 'home' directory in a file
62+
browser. Each new folder inside `kivy` represents a
63+
separate application::
11864

11965
/sdcard/kivy/<yourapplication>
12066

121-
To tell the launcher to even see your application you have to have
122-
`android.txt` file in your app's folder. The file has to contain three basic
67+
Each application folder must contain an
68+
`android.txt` file. The file has to contain three basic
12369
lines::
12470

12571
title=<Application Title>
12672
author=<Your Name>
12773
orientation=<portrait|landscape>
12874

129-
The file is editable so you can change for example orientation or name. You
130-
aren't allowed to change permissions however, so before building the launcher
131-
decide carefully what permissions do you need.
75+
The file is editable so you can change for example orientation or
76+
name. These are the only options dynamically configurable here,
77+
although when the app runs you can call the Android API with PyJNIus
78+
to change other settings.
13279

133-
After you set your `android.txt` file, you can now run the launcher and start
134-
any available app from the list.
80+
After you set your `android.txt` file, you can now run the launcher
81+
and start any available app from the list.
13582

13683
Release on the market
13784
---------------------
13885

139-
Launcher is released on Google Play with each new Kivy stable branch. Master
140-
branch is not suitable for a regular user because it changes quickly and needs
141-
testing.
86+
Launcher is released on Google Play with each new Kivy stable
87+
branch. The master branch is not suitable for a regular user because
88+
it changes quickly and needs testing.
14289

14390
Source code
14491
-----------
@@ -150,5 +97,4 @@ Source code
15097
pythonforandroid/bootstraps/pygame/build/src/org/renpy/android
15198

15299
If you feel confident, feel free to improve the launcher. You can find the
153-
source code at |renpy|_. Change the link if you want to contribute to other
154-
than pygame bootstrap.
100+
source code at |renpy|_.

0 commit comments

Comments
 (0)
0