The only way to really know how much battery is being used is to have hardware that measures actual current during various operations in your app.
And that tells you about battery use for *that* device, which can have fairly different characteristics from another device. So I would suggest that instead of getting lost in such details, you look at the general rules that people write about how to reduce battery use -- hold wake locks as little as possible, use the CPU as little as possible, etc. You can find out these kinds of details about your app with "adb shell dumpsys batteryinfo". On Wed, Jan 19, 2011 at 12:21 PM, Filip Havlicek <[email protected]>wrote: > Hi everyone, > > I have come to the point where I would like to optimize my application to > consume as less power as possible. I tried to search for some battery API or > something I could use to measure how much my application drains the battery > when it's running, but didn't find anything. I thought I could get at least > the Settings - About phone - Battery use stats, but couldn't even find those > values. Does anyone have some idea about this? Apart from buying some > specialized hardware to connect the phone to (already saw that and don't > want to pay hundreds of bucks for that kind of device). > > Thank you for all your replies. > Best regards, > Filip Havlicek > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

