Grepular

Google Phone Battery Usage Graphing

Written 9 years ago by Mike Cardwell

I’ve been learning how to program for my Android G1 “google phone” recently. I wanted to learn how to use the database and network communication APIs at the same time as learning how to write background services. I decided I would write something to monitor my battery level and upload data about it to my server which would then graph it using RRDtool. The final result is the following three graphs. They’re not static graphs, they’re being updated every fifteen minutes:

Hourly graph

Daily graph

Weekly graph

I’m using an extended life battery which makes a charge last about 225% as long as the standard G1 battery. That gives you an idea of the charge and discharge times of the phone. I tend to have wifi and bluetooth turned off unless I need them.

Update:

For access to the source code, please see Android Battery Graphing Source Code

Looking to hire somebody like me? I'm open to offers of full time employment and small contract jobs. Check out my hiring page. You can follow this Blog using RSS or . To read more, visit my blog index.

Feeling generous?BitcoinMoneroZcashPaypal