Hi, I have the following code
AndroidJavaClass up = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject ca = up.GetStatic<AndroidJavaObject>("currentActivity");
//the previous intent that started this app
AndroidJavaObject intent = null;
try
{
intent = ca.Call<AndroidJavaObject>("getIntent"); //no exception ever happened(?)
}
catch (Exception e)
{
logText.text += e.ToString();
successGetIntent = false;
}
try
{
var strings = intent.Call<string[]>("getStringArrayExtra","KEY"); //this causes crash even in try catch if there no such extra send to this app
}
catch (Exception e)
{ //do smthng}
up.Dispose();
ca.Dispose();
intent.Dispose();
the problem is, everytime I call getStringArrayExtra
it will always crash and stop the unity, I cant even catch the exception. Is there anyway to solve this?
Thanks