8000 provide api versions in android package · kivy/python-for-android@0f40dba · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f40dba

Browse files
committed
provide api versions in android package
1 parent 03f3321 commit 0f40dba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

recipes/android/src/android/_android.pyx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ cdef extern void android_hide_keyboard()
172172

173173

174174
from jnius import autoclass
175+
176+
# API versions
177+
Build = autoclass('android.os.Build')
178+
api_version = Build.VERSION.SDK_INT
179+
version_codes = Build.VERSION_CODES
180+
181+
175182
python_act = autoclass('org.renpy.android.PythonActivity')
176183
rctx = autoclass('android.graphics.Rect')()
177184
mActivity = python_act.mActivity

0 commit comments

Comments
 (0)
0