|
Hello, I created sample application using Unity trial, deployed it to my Android phone and launched. It works ok, but when I quit it (Application.Quit()) and try to instantly relaunch it, touching the app icon causes screen refresh only (all icons disappears and are back in a fraction of second). The second touch launches application again. But, if I wait a few seconds after quitting, touching app icon works as supposed - app is launched. I believe this issue is not related to my specific game, because I observe the same behavior for official Angry Bots downloaded from Google Play. Is this an expected behavior? Btw - my phone is Samsung Galaxy S2, Android 2.3.3
(comments are locked)
|
|
This is expected, since you are not advised to manually shut down apps(the OS determines the proper time to shut the app down). Its not a unity problem, or problem in the OS..just how it works. I take your point, though there are many application not following this rule and pressing back just quits these apps instead of moving them to background. Even some Google apps behaves like this, e.g. Maps or Sky Map. So it definitely is some issue related to how Unity works (or maybe Mono). Anyway - what should be the proper way of handling back button then? I.e. I launch a game, press back and want to be taken out of the game, which should be in the background now. As far as I know, there is no such possibility in Unity SDK. Or hopefully I'm missing something...
Aug 11 '12 at 11:27 AM
ArkaneX
Processes will be quit, whereas apps should not. I know there are games that dont follow this rule, and that may be what you want to do..not sure if your app will be rejected for hard quitting your app tho(i know iphone has strict rules about not using this functionality). Heres a portion of an article explaining why killing an app isnt exactly doing any good: "It's actually possible that this will worsen your phone's performance and battery life. Whether you're manually killing apps all the time or telling the task killer to aggressively remove apps from your memory, you're actually using CPU cycles when you otherwise wouldn't—killing apps that aren't doing anything in the first place." As far as i know there is no ReturnToHomepage type functionality. You can write a plugin that does this using the following native code
Aug 11 '12 at 07:26 PM
OperationDogBird
Thank you for all the information and for providing the snippet. Now I have to consider which path to follow, but I guess I'll stick to Application.Quit() - if Angry Birds and Temple Run (made in Unity) can successfully use it, then I believe I can too ;)
Aug 11 '12 at 08:01 PM
ArkaneX
(comments are locked)
|
