- Home /
Answer by Jessy · Jan 13, 2011 at 04:24 AM
Hit the Home button, or whatever the Android equivalent is. I don't know anything about Android, but iOS apps do not have any sort of software quit options.
When you have multitasking, you want to have an exit option so the user doesn't just have that app hanging in memory.
@ina: the iPhone handles memory for you. You don't have to do anything. If memory runs low, it quits apps as needed. If you're manually closing apps, you're doing it wrong.
Well, if a user wants to be neat and organized and exit an app, there ought to be a way to exit.. Are you saying there's no way to create an exit button for Unity android/iphone?
Double-tap the home button, hold your finger down, and tap the $$anonymous$$us icons in the multitasking bar.
Answer by Wolfram · Jan 24, 2011 at 08:24 PM
Apple's policy does not allow this. You should always use the Home button. If you want to prevent an app from continuing to run in the background (although it's being paused then) after hitting Home, search the web for UIApplicationExitsOnSuspend. Setting this will quit the app when pressing Home.
EDIT: Haven't worked with Android yet. If Application.Quit() is not ignored on Android, and the application keeps running when hitting the Back button, you can try to quit the app in OnApplicationPause(), but not sure.
Application.Quit is (silently) ignored on android :( - it brings you back to homescreen, but if you hold the home button to see the multitask apps, the unity app is still running!!
Though, i have noticed some errors on the Galaxy, not sure on other android phones, but the proper way to exit an App it to go "Back" all the way to the home screen, this is the way the program should "Close" itself without suspending it in memory.. but after the last Android update, it has stopped doing this and it sits in memory where i have to manually close it...
..So application.Quit() could work potensially?
I got this to work. I just called Application.Quit() but I put it in a loop so it executes multiple times. Such as: if (isQuitting) { Application.Quit(); } And just have a button to set the isQuitting to true.
@matrix211v1 - i wonder if apple, since their policy does not allow the quit option in an app, would reject that in app review?
I don't see that running on my Android. It does show it as a "recent app" when I get my home button. When I look at the Application, $$anonymous$$anagement I do not see it running.
Your answer
Follow this Question
Related Questions
Sending Mobile Email via Unity 2 Answers
Sending crash report from a iphone or android app 0 Answers
Fur on Characters for Unity Mobile Android / iPhone 1 Answer
Vertical Auto Aiming - whats the best way to do it? 2 Answers
iPhone and Android difference? 0 Answers