views:

29

answers:

1

How can i get battery usage by application in android. I need to know % of battery spent by application. It's possible using SDK?

The information that i need, using an android device it's on "Settings>About phone>Battery use"

Thanks

A: 

I've never done this, but you can browse the source code for the Activities which are responsible for this behavior on current Android devices:

PowerUsageSummary.java, PowerGaugePreference.java, or the parent fuel gauge directory.

Josh