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
1
Question by Wesley Kam · Feb 26, 2013 at 04:34 PM · androidquit

Android: Application.Quit doesn't fully quit game?

Hey guys,

Well, I'm currently working on an Android game, but I can't seem to find a proper way to fully shut down a game by means of an on-screen button... Like, an Exit Button.

When I attached an Application.Quit() to it, it looks like it quit from the game, but when I check the background running apps, its still going on... When I tap on that background app, it opens up a "new" instance of the entire game.

Can someone tell me what to do?

Thanks!

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

1 Reply

· Add your reply
  • Sort: 
avatar image
7
Best Answer

Answer by GerryM · Feb 26, 2013 at 04:42 PM

Don't worry, it's working as expected.

The fact that your game does restart when you click it means that it actually did quit. Android doesn't necessarily delete the app from memory as this causes a higher load on the device than leaving it disabled. It eventually will purge it from memory.

The advantage is that it will restart your app even faster that way.

See here

Comment
Add comment · Show 2 · 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 Bunny83 · Feb 26, 2013 at 05:16 PM 1
Share

Yes, the "background apps" are actually called "recent apps" ;) If you quit the game with Application.Quit it's really closed. When you tab it again it will completely restart. The feature of recent apps is an OS feature. You can't remove your app from this list.

Just check the real list of running applications. Go into settings/Apps/running and you see a list of currently running apps and services. You will never see your Untiy app there because it's suspended when you press the home button. tab the button on the top right "show cached processes". If you didn't quit your application you will see a cached process there which will be reloaded when you switch back to your app.

If you quit your app, it won't be listed there. The recent apps is really just a list of recently used apps which includes the ones that are currently running. You can't distinguish between them in the "recent apps view", so i usually keep the list short / empty as a user ;)

Cached processes are usually removed when the OS runs out of memory, but they have a hit on performance either way. So cleaning up the memory is one of the main tasks of the user on an Android tablet :D

edit btw your settings menu might look differently. I have a nexus7 tablet, just in case you can't find the menu items i've mentioned.

avatar image Wesley Kam · Feb 27, 2013 at 02:54 PM 0
Share

Oooooooohh... I see... Sorry, tad bit new to this Android development thang.

Thanks again guys! $$anonymous$$uch appreciated!

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

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Androud quit on doubletap escape 1 Answer

UnityPlayer quit is killing both itself and the Android app 0 Answers

Play Games Turn-Based Multiplayer: lose game onApplicationQuit 1 Answer

Galaxy S random quitting 2 Answers

Application.Quit Does Not Fully Kill App 1 Answer


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