简体   繁体   English

Android —我们如何确定每个应用程序的电池使用情况统计信息?

[英]Android — How can we determine the Battery Usage statistics per application?

I am having trouble finding a class or API in Android documentation that would help me get battery usage statistics per application. 我在Android文档中找不到可以帮助我获取每个应用程序电池使用情况统计信息的类或API时遇到问题。

I have read PowerManager and BatteryManager classes but they are of no use. 我已经阅读了PowerManagerBatteryManager类,但是它们没有用。

However, I can find applications like PowerTutor that do provide battery usage statistics per application, so I think it's technically possible. 但是,我可以找到像PowerTutor这样的应用程序,这些应用程序确实提供了每个应用程序的电池使用情况统计信息,因此我认为这在技术上是可行的。

Can any one point me in right direction? 谁能指出我正确的方向?

I'd be surprised if such an API exists. 如果存在这样的API,我会感到惊讶。 Rather, I expect that PowerTutor is using some sampling heuristics to estimate how much of the current battery usage to blame on each application. 相反,我希望PowerTutor使用一些采样试探法来估计每个应用程序中应归咎于当前的电池使用量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM