Android ApplicationsAll the information you could ever want about Android Applications. Learn about apps and get help with them... all here! New apps can be found and announced in the Applications Announcements forum linked below.
I've been researching the OS a bit and I can't really tell what happens to programs when you hit the home button to leave them. Do they stay running in the background? After a little bit of time does the system close them out? What happens to them? I have a Sprint Evo and I don't see a way to close them out. I know that battery life can always be helped, and I would hate to leave them running all day just sucking the life out of the phone if they don't have to be. Thanks in advance.
dont quote me but I think I read that if you use the home button they do not close right away, (not sure when they do close or if they do) but if you use the back button to exit they will close.
Thanks guys. It seemed illogical that there would be no way to really end an app if you had to. I'm cool with it closing them down on it's own. I just didn't want to pull a Windows Mobile and look at my phone in a few hours after playing with it and see that my usage is at 83% and there are 15 tasks open. If Android can manage itself fine, I would rather not screw with it. Thanks to all.
As a general rule, exiting an app with the HOME button means "I want to return to this in a while", and exiting an app with the BACK button means "I'm done with this". Some apps may stick around in memory even if you exit with BACK, but at least the OS is aware that the program does not have any loose ends (open activities).
Device(s): Droid X, HTC One S, Samsung Galaxy S 4G, Nook Color
Thanks: 114
Thanked 297 Times in 175 Posts
Quote:
Originally Posted by KlaymenDK
As a general rule, exiting an app with the HOME button means "I want to return to this in a while", and exiting an app with the BACK button means "I'm done with this".
Is that actually documented anywhere? Truth or myth?
And yet most apps, meaning the huge majority, continue to run after using the back button. Try a task killer like System Panel and you'll see for yourself.
And yet most apps, meaning the huge majority, continue to run after using the back button. Try a task killer like System Panel and you'll see for yourself.
I dont get why apps are handled like this. I always hear people say "just let Android manage the memory". It creates problems with home replacement apps. If there is not enough free memory LauncherPro force closes. Why do apps need to continue to run in the background?? We should not need to run a task killer.
If a foreground app crashes due to a low memory error, there is a problem either with that app or the OS itself. Android is supposed to be handling the memory to ensure sufficient memory is available (as explained in the Android Developers Blog article). Maybe that app just wants more memory than is available in total, or maybe the user is running a lot of unkillable background services. I don't know.
As for "why do apps need to stick around"; you might find the opposite position interesting: why kill them before you need their resources? On Windows, Firefox got bad press for the longest time because of its huge memory footprint. It clearly didn't use all that memory, but, since nobody else was asking for it, Firefox didn't need to bother to release it. Why is it better to have unallocated memory, than to put it to (potential) use? Undue garbage collection needlessly increases the work load (=battery consumption).
I hope that makes sense (I'm not asking if you agree to the method, just if it's clear what it does)?
I'm seriously not trying to flame anyone, only trying to explain. If my words seem harsh, that's just because I'm a programmer of computers and not a wordsmith for humans.
I think the basic thing to understand is that apps don't "run" in the background unless they have a specific reason to. They are just essentially cached in memory once you leave them.
Device(s): HTC Evo 4G w/ Synergy rls1, B&N Nook Color w/ Miui
Thanks: 58
Thanked 141 Times in 113 Posts
Quote:
Originally Posted by othgar
I dont get why apps are handled like this. I always hear people say "just let Android manage the memory". It creates problems with home replacement apps. If there is not enough free memory LauncherPro force closes. Why do apps need to continue to run in the background?? We should not need to run a task killer.
I think you've got that backwards. The OS comes first, if the app can't work properly with the OS, then there's something wrong with the app (by design in the case of home replacements, IMHO).
__________________
Founder of the Society for the Prevention of Apostrophe Abuse.
So I'm still not clear - should we press the back button when exiting an app or is pressing the home button fine?!
It very much depends on the application, and how it was designed. Let me rephrase that: it depends on whether or not you're done with it.
If a given app has implemented state-saving, then it won't matter because the app will continue where it left off (say, editing an address book entry, then going out to an image app to adjust and set an image, then going back and finishing the contact). OTOH, many games immediately discard their state when you switch away from them, and return to the "Insert Coin" screen (as it were) when you return to them.
The stock browser is a good example; you can usually browse away and then continue it later, but if you do "too much" in between you will find your session has been reset. That's an example of state-saving, and discarding state, by the same app. However, if you choose to "back out" of the browser (and you may sometimes experience a very long way back), your next session will definitely be a fresh one.
That's why I keep saying that choosing the BACK button amounts to telling the OS "I am done with this", and choosing the HOME button amounts to telling the OS "I (may) want to return to this in a while".
There's a difference to the application you're doing it to, but other apps (including the OS) should not need to care. You might view "available RAM" as a measure of "wasted potential".
The Following User Says Thank You to KlaymenDK For This Useful Post:
im a newbee to andriod and found this very interesting. I have one question: i downloaded advance task killer because i didn't undersand. Now my question is, why are there apps open on the list that i have not opened? example City ID. i never use it and am wondering how it opened. same thing with voice dialer.
As a long long time Linux user this little bit of reading makes great sense and clears up a lot of different user driven myths for me. It and they (Android and Dev teams) are smarter then me and should know better the needs of the system.
Gonna try life with out any task managers now. I already ditched all extra home apps in favor of just using what I bought. So far this has work well for me, all tho I am missing the extra screens.
All in the pursuit of better longer battery life.
__________________
"People not things effect change." Steve needs to learn this, ditch the iPhone for an open world.
Android - Linux for the people. The Techno Mage Moto D PRO | HTC DhD | NOOK COLOR cm7bt