- Home /
How to start the UnityPlayerActivity from a java plugin that overrides the basic Android Activity
So, basically i have made a Java plugin for Android that overrides the main Activity class. It's called ContentDownload and it's instantiated from the AndroidManifest file fine and all is well. The problem is that when it is finished my UnityPlayer doesn't start up. I.e. the app just waits there on a black screen. If i remove the call to the plugin from the Android Manifest then the game runs perfectly fine. So i'm wondering if anybody knows what call i need to make inside my override of Activity that will start the UnityPlayer - or how i find that out.
i think it should be something along the lines of UnityPlayer.currentActivity.startActivity(... ??
All help greatly appreciated! thanks!
Answer by Ross_S · Jan 28, 2013 at 08:36 AM
...and the answer is something like this...
if(result == RESULT_OK) { final Intent intent = new Intent(this, UnityPlayerActivity.class); final Runnable displayUpdate = new Runnable() { public void run() { startActivity(intent); } }
Your answer
Follow this Question
Related Questions
(Android) mUnityPlayers SurfaceView Access 2 Answers
Android plugin & Activity help needed - "GetMethodID method not found" problems 0 Answers
How can I access Native Android Classes with parameters? 1 Answer
UnityPlayerActivity vs. UnityPlayerNativeActivity 0 Answers
java android plugin worker thread ends up in Unity mainthread 1 Answer