Skip to content

Commit 6ab2f19

Browse files
committed
Added initial apis doc
1 parent 347e877 commit 6ab2f19

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

doc/source/apis.rst

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,31 @@ you would normally accomplish everything from vibration, to opening
88
other applications, to accessing sensor data.
99

1010
These APIs can be accessed from Python to perform all of these tasks
11-
and many more.
11+
and many more. This is made possible by the `Pyjnius
12+
<http://pyjnius.readthedocs.org/en/latest/>`__ module, a Python
13+
library for automatically wrapping Java and making it callable from
14+
Python code. This is fairly simple to use, though not very Pythonic
15+
and inherits Java's verbosity. For this reason the Kivy organisation
16+
also created `Plyer <https://plyer.readthedocs.org/en/latest/>`__,
17+
which further wraps specific APIs in a Pythonic and cross-platform
18+
way - so in fact you can call the same code in Python but have it do
19+
the right thing also on platforms other than Android.
20+
21+
These are both independent projects whose documentation is linked
22+
above, and you can check this to learn about all the things they can
23+
do. The following sections give some simple introductory examples,
24+
along with explanation of how to include these modules in your APKs.
25+
26+
27+
Using Pyjnius
28+
-------------
29+
30+
Pyjnius lets you call the Android API directly from Python. You can
31+
include it in your APKs by adding the `pyjnius` or `pyjniussdl2`
32+
recipes to your build requirements.
33+
34+
35+
Using Plyer
36+
-----------
37+
38+

0 commit comments

Comments
 (0)