MCPcopy Create free account
hub / github.com/defold/defold / Sys_GetApplicationInfo

Function Sys_GetApplicationInfo

engine/script/src/script_sys.cpp:952–968  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.85
lua_pushbooleanFunction · 0.85
lua_rawsetFunction · 0.85
GetApplicationInfoFunction · 0.50
assertFunction · 0.50

Tested by

no test coverage detected