19 AndroidJavaClass unityPlayer =
new AndroidJavaClass(
"com.unity3d.player.UnityPlayer");
20 currentActivity = unityPlayer.SafeGetStatic<AndroidJavaObject>(
"currentActivity");
89 var bundle = intent.SafeCall<AndroidJavaObject>(
"getExtras");
90 if (bundle ==
null)
return false;
91 return bundle.SafeCall<
bool>(
"containsKey", key);
103 return intent.SafeCall<
bool>(
"getBooleanExtra", key, defaultValue);
114 return intent.SafeCall<
string>(
"getStringExtra", key);
120 return NativeUtils.SafeCall<
bool>(
"isAppInstalled", packageName);
124 public static bool LaunchApp(
string packageName,
string[] extraKeys,
string[] extraValues)
126 return NativeUtils.SafeCall<
bool>(
"launchApp", packageName, extraKeys, extraValues);
static AndroidJavaObject applicationContext
static AndroidJavaObject PackageManager
static AndroidJavaObject CurrentActivity
JNI to call com.unity.player.UnityPlayer.currentActivity()
static string GetIntentStringExtra(string key)
Returns a string from the Android intent extras.
static AndroidJavaObject ApplicationContext
JNI to call CurrentActivity.getApplicationContext()
static AndroidJavaObject packageManager
static AndroidJavaObject ApplicationInfo
JNI to call ApplicationContext.getApplicationInfo()
static AndroidJavaObject NativeUtils
Returns an instance of the PixoUtils.java class in the Apex SDK.
static AndroidJavaObject currentActivity
static bool LaunchApp(string packageName, string[] extraKeys, string[] extraValues)
static bool GetIntentBooleanExtra(string key, bool defaultValue)
Returns a boolean from the Android intent extras.
static AndroidJavaObject nativeUtils
static bool HasIntentExtra(string key)
Returns if the Android intent extras bundle has a key with the given name.
static AndroidJavaObject applicationInfo
static bool IsAppInstalled(string packageName)