- Home /
Issue application.Quit Takes much time to close android application
I have an issue with application.Quit, i close my application when the user clicks on back button but what happens is that the android application freezes for about 4-5 seconds the truns to black screen , then shows the status bar with the application name then after another 5-7 secs it closes so the game quitting takes about 15 secs ,too much time.
I dont know the reason behind this , i have google game service and some other assets integrated in my game should i need to carry out any procedure before closing the game? is there anything more powerful than application.Quit to kill the game instantly? Did you face similar behavior before, i tried more than one solution but nothing helped thank you very much
as far as I know it's not advisable to implement an application exit for mobile devices.
Thanks for the link. Note that Google encourage "User Discretion" with regard to the Quit functions. A user should have the ability to close the App but it should not be necessary/essential.
It feels like you're trying to replicate existing functionality. "Simulating" the home button is easy, let the user press the home button! Unity does not provide this because the OS already handles this case. 'Back' should simply bring the user through a series of scenes that eventually lead to a "menu" of some sort. If the user wants to go home they'll press the OS provided button.
Answer by phuongdong008 · Jan 09, 2015 at 07:10 PM
In my case, the same problem happened after I integrated Admob plugin into Unity. If this is also your case, you can solve by going to the Plugin/Android/AndroidManifest.xml file and delete the entire UnityPlayerProxyActivity and then move the intent filter down under to the UnityPlayerActivity.
Answer by siddharth3322 · Feb 16, 2015 at 03:09 AM
If you are facing this problem then I have solution for it. I have similar problem for my game. Normally in game quit process works well but after adding some plugin I was facing same problem for android device built.
For solution, I have set UnityPlayerActivity as my launcher activity. Now game quit process work smoothly as before.
<activity
android:name="com.unity3d.player.UnityPlayerActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Your answer
Follow this Question
Related Questions
How do I tell command prompt to do a command after I open it through Unity? 1 Answer
I want to export from Unity to Oculus Rift. I'm using Unity 5.1.2p3. 0 Answers
Scheduling a job issue 1 Answer
Game launches as background process in windows 2012 0 Answers
Run fastlane process and redirect output 0 Answers