Module android
FFI bindings for android native APIs and Java Native Interface (JNI).
see https://developer.android.com/ndk/reference/struct/a-native-activity and https://developer.android.com/reference/games/game-activity/group/android-native-app-glue
Functions
asset_loader (modulename) | A loader function for Lua which will look for assets when loading modules. |
getFlavor () | Build identification. |
getScreenWidth () | Gets screen width. |
getScreenHeight () | Gets screen height. |
canWriteSettings () | Android permission check. |
Functions
- asset_loader (modulename)
-
A loader function for Lua which will look for assets when loading modules.
Parameters:
- modulename string
Returns:
-
module or error message
- getFlavor ()
-
Build identification.
Returns:
-
string
flavor
- getScreenWidth ()
-
Gets screen width.
Returns:
-
int
screen width
- getScreenHeight ()
-
Gets screen height.
Returns:
-
int
screen height
- canWriteSettings ()
-
Android permission check.
Returns:
-
bool
hasWriteSettingsPermission