I found an answer that gave me the code below:
AndroidJavaClass UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject currentActivity = UnityPlayer.GetStatic("currentActivity");
AndroidJavaObject intent = currentActivity.Call("getIntent");
bool hasExtra = intent.Call("hasExtra", "arguments");
if (hasExtra)
{
Debug.Log("Extras");
}
But it never seems to have extras when I am sure I am getting sent extras. Is there a certain point where the code above only works, or can I call it at any time (in an update or whatever) after the intent is called, and have it always contain the extras that were sent?
It could also be a problem with my manifest considering I don't know them that well. Do I have this set up correctly to receive extras? It comes from the second intent-filter. It starts (or continues) the app correctly, but I am not sure I set the manifest up correctly. (I changed some names below due to NDA).
Thank you for any help!
↧