get application information * * Returns a table with application information for the requested app. * * [icon:iOS] On iOS, the `app_string` is an url scheme for the app that is queried. Your * game needs to list the schemes that are queried in an `LSApplicationQueriesSchemes` array * in a custom "Info.plist". * * [icon:android] On Android, the `app_string` i
| 950 | * ``` |
| 951 | */ |
| 952 | static int Sys_GetApplicationInfo(lua_State* L) |
| 953 | { |
| 954 | int top = lua_gettop(L); |
| 955 | |
| 956 | const char* id = luaL_checkstring(L, 1); |
| 957 | |
| 958 | dmSys::ApplicationInfo info; |
| 959 | dmSys::GetApplicationInfo(id, &info); |
| 960 | |
| 961 | lua_newtable(L); |
| 962 | lua_pushliteral(L, "installed"); |
| 963 | lua_pushboolean(L, info.m_Installed); |
| 964 | lua_rawset(L, -3); |
| 965 | |
| 966 | assert(top + 1 == lua_gettop(L)); |
| 967 | return 1; |
| 968 | } |
| 969 | |
| 970 | // Android version 6 Marshmallow (API level 23) and up does not support getting hw adr programmatically (https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id). |
| 971 | static bool IsAndroidMarshmallowOrAbove() |
nothing calls this directly
no test coverage detected