Does anyone know how often Android refreshes battery statistics? This screen is Settings > Battery. This may only apply to Android versions >4.0.

  • final: it took me 1 minute to get my app visible in the list – deadfish Nov 21 '12 at 12:24

I believe it is real-time. Meaning, the stats are always updated as the battery is being drained (or charged).

| improve this answer | |
  • 1
    To my knowledge it is. And the term "battery stats" might be a bit misleading here -- it's rather a statistic on how/which apps "sucked on it" ;) – Izzy Nov 20 '12 at 11:56

You can check the source code of battery history and battery history part of Settings. I hadn't got time to properly check it out, but from an initial scan, I think it's updated every time the app is started. The file from which the app generates the statistic however, batterystats.bin, is probably collected at real time as the system starts and kills apps and system services are turned on and off.

| improve this answer | |
  • first link says at line 323 Returns the total time (in 1/100 sec) spent executing in user code. I think this is it, right? – deadfish Nov 22 '12 at 10:44
  • @Lumma: I believe that's referring to real/user/sys time – Lie Ryan Nov 22 '12 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.