I was trying to call a Unity apk the “standard” Android way, via an intent, and sending some extra data along.
I don’t see anything in the src for NativeActivity - has anyone accomplished reading the Intent extras from Unity side?
Here’s the code I was using, but no extras are returned (and yes, I’m sure I’m calling the intent with extras):
var UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
var currentActivity = UnityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
var intent = currentActivity.Call<AndroidJavaObject>("getIntent");
var cmd = intent.Call<string>("getStringExtra", "cmd");
((Trivia: I know this was working a few Unity versions back, then the ProxyActivity broke it (a custom Activity was needed), now we have only NativeActivity left and it should work again without plugin)