I have an Android application that has a functional video player, and I want to use the AndroidJavaProxy to add an OnInfoListener.
class OnInfoListener : AndroidJavaProxy
{
public OnInfoListener() : base("android.media.MediaPlayer$OnInfoListener") {}
void onInfo(AndroidJavaObject mp, int what, int extra)
{
}
}
I already have an AndroidJavaObject called mediaPlayer which I am able to call to play/pause the video, so I then do this:
mediaPlayer.Call("setOnInfoListener", new OnInfoListener());
As soon as it reaches the point where this callback would be called it crashes the app out. I have tried to attach the debugger and trap the callback with mixed results, mostly it just crashes out.
I believe the callback comes from a different thread, is there any problem using AndroidJavaProxy with multiple threads?
Thanks