How do i stop mUnityPlayer.quit() closing the entire android app?

I’m working on an app that combines eclipse and unity. The use can switch activity to an activity that contains an instance of a UnityPlayer, displaying inside a view.

When i switch from this activity to another activity, mUnityPlayer.quit() is called to free the resources and end the player.

For some reason, this is closing the entire Application and not just the activity. How can i stop this behaviour?

You can stop this behavior by specifying a different process name (f.i. “:unity”) for the UnityPlayerActivity in the Android Manifest. It seems UnityPlayer kills its process when quit() is called so you just have to be sure your Application and other Activities have a different process name (by default it’s the Application package name).

See http://developer.android.com/guide/topics/manifest/activity-element.html#proc for more info.