summaryrefslogtreecommitdiff
path: root/external/plyer/platforms/android/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'external/plyer/platforms/android/__init__.py')
-rw-r--r--external/plyer/platforms/android/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/external/plyer/platforms/android/__init__.py b/external/plyer/platforms/android/__init__.py
new file mode 100644
index 0000000..6b565a3
--- /dev/null
+++ b/external/plyer/platforms/android/__init__.py
@@ -0,0 +1,12 @@
+from os import environ
+from jnius import autoclass
+
+ANDROID_VERSION = autoclass('android.os.Build$VERSION')
+SDK_INT = ANDROID_VERSION.SDK_INT
+
+if 'PYTHON_SERVICE_ARGUMENT' in environ:
+ PythonService = autoclass('org.renpy.android.PythonService')
+ activity = PythonService.mService
+else:
+ PythonActivity = autoclass('org.renpy.android.PythonActivity')
+ activity = PythonActivity.mActivity