Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ina · Jan 13, 2011 at 04:21 AM · androidmobileiphoneexit

Exit function for iPhone or Android app

How do you terminate the current Unity app on the iPhone or Android? How do you make an app close itself?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

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.

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ina · Jan 13, 2011 at 04:28 AM 0
Share

When you have multitasking, you want to have an exit option so the user doesn't just have that app hanging in memory.

avatar image Eric5h5 · Jan 13, 2011 at 05:29 AM 1
Share

@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.

avatar image ina · Jan 13, 2011 at 06:08 AM 0
Share

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?

avatar image Jessy · Jan 13, 2011 at 01:41 PM 0
Share

Double-tap the home button, hold your finger down, and tap the $$anonymous$$us icons in the multitasking bar.

avatar image ina · Jan 13, 2011 at 09:15 PM 0
Share

in other words, unity iphone can't close itself...

Show more comments
avatar image
1

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.

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ina · Jan 25, 2011 at 07:09 AM 0
Share

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!!

avatar image Matthew 5 · Feb 10, 2011 at 03:14 AM 0
Share

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?

avatar image matrix211v1 · Jul 25, 2011 at 01:13 AM 0
Share

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.

avatar image ina · Jul 25, 2011 at 03:55 AM 0
Share

@matrix211v1 - i wonder if apple, since their policy does not allow the quit option in an app, would reject that in app review?

avatar image matrix211v1 · Jul 25, 2011 at 04:22 AM 0
Share

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.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges