mirror of https://github.com/kivy/kivy.git
doc: Improved pyjnius example code
This commit is contained in:
parent
5e89597f7e
commit
2f0fe5af41
|
@ -122,9 +122,9 @@ Here is a simple example showing pyjnius' ability to access
|
||||||
the normal Android vibration API, the same result of the plyer code
|
the normal Android vibration API, the same result of the plyer code
|
||||||
above::
|
above::
|
||||||
|
|
||||||
from jnius import PythonJavaClass, java_method, autoclass, cast
|
|
||||||
|
|
||||||
# 'autoclass' takes a java class and gives it a Python wrapper
|
# 'autoclass' takes a java class and gives it a Python wrapper
|
||||||
|
from jnius import autoclass
|
||||||
|
|
||||||
# Context is a normal java class in the Android API
|
# Context is a normal java class in the Android API
|
||||||
Context = autoclass('android.content.Context')
|
Context = autoclass('android.content.Context')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue