I have go through following links to get the amount battery consumed by my app but i am not getting the solution for this query
link 1
link2
i have even try with this android class but no solution found with this, even search for the lib but no lib found for the battery .please suggest the the solution for this .. as other various app are having this functionality (battery doctor ,du battery saver , battery saver)
Asked
Active
Viewed 546 times
2

Community
- 1
- 1

techandroid07
- 73
- 1
- 8
-
summary: the battery usage api is private, also in order to get percentage for your app consumption you will have to calculate other apps usage to find your's, check this, it's really old post, but it could help you, http://stackoverflow.com/questions/3770021/how-to-get-information-about-android-battery-usage-by-application – Yazan Apr 12 '16 at 09:36
-
1i have tired with this adb shell dumpsys batterystats but how to decode this text file in the android app – techandroid07 May 11 '16 at 11:05