Hi all,
I have a problem that not being able to set the onActivityResult(int requestCode, int resultCode, Intent data) for the "currectActivity created in C#(Unity).
In Unity I have the code like this :
private AndroidJavaObject ajo;
void Start()
{
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
ajo = jc.GetStatic<AndroidJavaObject>("currentActivity");
ajc.CallStatic ("playVideo");
}
From C# I call this method in Java:
private void playVideo() {
....
startActivityForResult(intent, REQUEST_FOR_RESLUT);
}
However, because I do not know how to set the onActivityResult() method for the activity in C#, the startActivityForResult is just like a startActivity. I cannot get any callback from onActivityResult() .
I would appreciate if you can provide any help. Thanks.