3

I am developing a Battery profiling app and I am stuck at calculating total Battery Cycle for the device. Does anyone have idea about how to get this value either in API way or from adb command ? Or is there any hack possible ? Any help would be appreciated.

Thanks in advance.

snehal_penurkar
  • 273
  • 1
  • 3
  • 15

1 Answers1

1

The power consumption APIs turned into private since Android 4.0.2. There are two ways to implement this. One is using reflection method. Another is to program in source code environment. Here's a reference telling you how to use source code programming.

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

Xudong Ran
  • 101
  • 1
  • 3