Android Battery usage profiling

前端 未结 4 573
萌比男神i
萌比男神i 2020-12-12 22:54

Is there any way to profile the battery usage by the application in development environment or real time? BatteryManager seems not providing any per application API

4条回答
  •  轮回少年
    2020-12-12 23:35

    you can use the two classes: IBatteryStats and BatteryStatsImplernal in package com.android.internal, they provide methods to get the statistics of battery usage.

提交回复
热议问题