How to get information about android battery usage by application

后端 未结 3 1145
闹比i
闹比i 2020-11-30 06:16

How can I get battery usage per application in Android.

I need to know % of battery spent by application.

Is it possible using SDK?

What I need is th

3条回答
  •  Happy的楠姐
    2020-11-30 07:09

    I've viewed a lot and found that many APIs used in battery usage stats are from package "com.android.os.internal" which is not open to us.

    I don't know if it's possible to implement this package by copy the code into our own project and import it. Just a thought. I think Chris's method maybe available.

提交回复
热议问题