32 AndroidJavaClass unityPlayerClass =
new AndroidJavaClass(
"com.unity3d.player.UnityPlayer");
34 AndroidJavaObject currentActivity = unityPlayerClass.GetStatic<AndroidJavaObject>(
"currentActivity");
36 AndroidJavaObject intent = currentActivity.Call<AndroidJavaObject>(
"getIntent");
38 string urlData = intent.Call<
string>(
"getDataString");
40 string optionalParameter =
"", returnTargetParameter =
"", targetTypeParameter =
"", pixotoken =
"";
42 UDebug.Log(
"[PixoAndroidPlatformUtilities] Parsed Passed Data.");
43 if(urlData !=
null && urlData.Length > 0)
45 UDebug.Log(
"[PixoAndroidPlatformUtilities] Parse from URL.");
51 UDebug.Log(
"[PixoAndroidPlatformUtilities] Parsing from extras.");
52 optionalParameter = intent.Call<
string>(
"getStringExtra",
"optional");
53 returnTargetParameter = intent.Call<
string>(
"getStringExtra",
"returntarget");
54 targetTypeParameter = intent.Call<
string>(
"getStringExtra",
"targettype");
55 pixotoken = intent.Call<
string>(
"getStringExtra",
"pixotoken");
58 Dictionary<string, string> parameters =
new Dictionary<string, string>();
60 if (!
string.IsNullOrEmpty(optionalParameter))
62 parameters.Add(
"optional", optionalParameter);
65 if (!
string.IsNullOrEmpty(returnTargetParameter))
67 parameters.Add(
"returntarget", returnTargetParameter);
70 if (!
string.IsNullOrEmpty(targetTypeParameter))
72 parameters.Add(
"targettype", targetTypeParameter);
75 if (!
string.IsNullOrEmpty(pixotoken))
77 parameters.Add(
"pixotoken", pixotoken);