Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old December 12th, 2011, 02:15 AM   #1 (permalink)
Member
 
Join Date: Mar 2011
Location: Canada
Posts: 258
 
Device(s):
Thanks: 22
Thanked 28 Times in 23 Posts
Default Exiting apps: home vs back button

From my layman understanding of how android OS works, leaving an app via the home button will place the app in a "pause" state but not remove it from memory until the OS decides it has been paused a while and wants the resources for something else.

Using the back button is supposed to tell the OS that you're done with the app and take the service out of memory usage *IF* the app was coded well enough to cooperate.

But I've noticed on my phone that no matter which method I've used, when I open the stock task manager the apps remain as running services regardless. So does it make any difference on my battery life and system resources which method I use?

omnius is offline  
Reply With Quote
Sponsors
Old December 12th, 2011, 08:39 AM   #2 (permalink)
Member
 
Join Date: Dec 2010
Location: Aarhus, Denmark
Posts: 134
 
Device(s): SE Xperia X10
Thanks: 2
Thanked 22 Times in 22 Posts
Default

All of this depends on how the developer created the app, and how it handles shutdowns. It is easy to keep the app running when the back button is clicked - or at least leave a background service running even though the actual app has been shut down. In many cases developers have simply forgot to close their service when it is no longer needed.

If the programmers are any good, they will at least make the service so it does not do anything when it is not critically needed, and therefore it shouldn't take much of your battery or processing power, while just being ready in the background listening for whatever.

But it is all up to the developer what happens when you try to close the app...
JamTheMan is offline  
Reply With Quote
Old December 16th, 2011, 05:29 AM   #3 (permalink)
Member
 
Join Date: Mar 2010
Posts: 214
 
Device(s):
Thanks: 3
Thanked 15 Times in 11 Posts
Default

Aah, no. Its not up to the developer.

A service cannot be stopped by pressing the back button.

Pressing the home button will open the home screen, not exit the app.
ftgg99 is online now  
Reply With Quote
Old December 16th, 2011, 10:28 PM   #4 (permalink)
Member
 
Join Date: Mar 2011
Location: Canada
Posts: 258
 
Device(s):
Thanks: 22
Thanked 28 Times in 23 Posts
Default

Right but will that app be using more resources than leaving it via the back button? My understanding is that android simply reclaims the resources either as needed or if that app is not actively on screen for a period of time.
omnius is offline  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 11:54 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo