Android battery profiling. Calculate battery cycle

I am developing a battery profiling application and I am stuck in calculating the entire Battery cycle for a device. Does anyone have any idea how to get this value either in the API or from the adb command ? Or is there some kind of hack? Any help would be appreciated.

Thanks in advance.

+3


source to share


1 answer


Power APIs went private with Android 4.0.2. This can be done in two ways. One uses the reflection method. Another is a program in a source code environment. Here's a link telling you how to use source code programming.



https://github.com/anggrayudi/android-hidden-api

0


source







All Articles