1. Download our Official Android App: Forums for Android!

General Battery stats - CPU total vs CPU foreground

Discussion in 'Android Devices' started by ryancalif, Sep 11, 2012.

  1. ryancalif

    ryancalif Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    93
    Joined:
    Sep 8, 2012

    Sep 8, 2012
    93
    8
    16
    I'd like to make sure I'm understanding these battery stats correctly.

    I assume, through common sense, that the difference between CPU total and CPU foreground gives you the CPU background time... Is this correct?

    The reason I ask is that I have a few apps, (Internet, for example) that appear to have moderate background CPU times. The thing is, I dont keep any pages open in the browser when I close it, and I also close the app using the back button, not the home button. So, my question is, what's using up the CPU in the background?

    Am I understanding these stats correctly? Thanks
     

    Advertisement

  2. ryancalif

    ryancalif Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    93
    Joined:
    Sep 8, 2012

    Sep 8, 2012
    93
    8
    16
    Don't all speak up at once now... lol
     
  3. SUroot

    SUroot Android Expert
    Rank:
    None
    Points:
    1,123
    Posts:
    23,925
    Joined:
    May 25, 2010

    May 25, 2010
    23,925
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    CPU Total - CPU Foreground = CPU background
     
  4. valorian

    valorian Android Expert
    Rank:
    None
    Points:
    193
    Posts:
    1,947
    Joined:
    Feb 15, 2011

    Feb 15, 2011
    1,947
    499
    193
    Male
    Northern Illinois
    Just because you use the back button instead of the home button doesn't mean the app will close out completely. If an app as an Exit or Quit from a menu, that usually closes an app, not the back button.
     
  5. ryancalif

    ryancalif Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    93
    Joined:
    Sep 8, 2012

    Sep 8, 2012
    93
    8
    16
    Thanks for the replies! I know this horse has been beat, pulverized, reconstituted and pulverized five more times, but what exactly is the recommended method of leaving apps?

    I'm not one to purge my task manager every time I leave a program, rather I just want to operate the phone the way in which it was intended to operate. I assume thats by using the home button to leave apps, and if I notice a problem with an app, close that affected app.
     
  6. valorian

    valorian Android Expert
    Rank:
    None
    Points:
    193
    Posts:
    1,947
    Joined:
    Feb 15, 2011

    Feb 15, 2011
    1,947
    499
    193
    Male
    Northern Illinois
    For me, if the app has a quit or exit in it's menu I use that. If it doesn't I use the back button and let the Android OS manage any apps running in the back ground for me.

    If I experience an app giving me problems I'm go into app manager and force close the app then clear the app's cache. It is very rare that I have to do this.
     
  7. ryancalif

    ryancalif Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    93
    Joined:
    Sep 8, 2012

    Sep 8, 2012
    93
    8
    16
    Which way does Samsung/Android prefer?

    It seems to me that the OS was designed for users to press the home button to leave apps, but I'm not sure about this since the documentation is vague about which way is proper. I realize the app may still be cached in the RAM after doing this, but I thought the design was meant for Android to do the management.
     
  8. valorian

    valorian Android Expert
    Rank:
    None
    Points:
    193
    Posts:
    1,947
    Joined:
    Feb 15, 2011

    Feb 15, 2011
    1,947
    499
    193
    Male
    Northern Illinois
    Home or back button doesn't really matter in my opinion.

    Yes, the Android OS will manage the RAM. If an app you were using is still in RAM and the OS does not need it, it will remove it from RAM so some other app can use the RAM.
     
  9. MercuryStar

    MercuryStar Lurker
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Nov 19, 2012

    Nov 19, 2012
    1
    0
    5
    From what I have been able to determine:

    • CPU foreground = CPU usage while the app is in the foreground (visible on screen and focused)

    • CPU background = CPU usage while the app is running in the background (it has a background process, or widget, etc)

    An app that has no reason to run in the background should not show much, or any, under CPU background.

    As for how to close an app, most information sofar is incorrect (apart from valorian's post). Truth is, it totally depends on the app.


    • If the app has background processes, then it can continue running after you close it, no matter how you close it.

    • If the app doesn't have background processes, it won't continue running after you close it, no matter how you close it.

    • If you close an app by simply touching the home button, *usually* the app will save what screen you were on so when you return to the app later, it goes back to that screen. The app state remains cached in memory for as long as there is free memory, but that doesn't mean the app remained running or using up memory, it just means it's faster to return to the app again later. That's how Android is supposed to work.

    • In many apps, if you continually press the back button, eventually the app will close in such a way that it doesn't remember its state when you later return to it. Some people mistakenly believe this saves CPU, thinking that if they don't do this, the app will continue running in the background.
     

Share This Page

Loading...