• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Battery stats - CPU total vs CPU foreground

ryancalif

Member
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
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
Back
Top Bottom