如何以编程方式获取每个应用在Android中的电池使用百分比 [英] How to get percentage of battery usage by each app in android programatically
问题描述
我正在演示所有应用程序的电池使用率百分比.我能够获得总可用电池百分比,但是想按每个应用程序分别按百分比获取电池使用率.所以有什么办法可以做到这么多应用已在市场上出售.请帮助或建议保存新手.
设置"中的仅电池使用情况"屏幕,您可以在其中查看每个应用程序的电池使用情况.没有API或命令行方法来获取此信息.请参阅stackoverflow中的类似问题讨论: Android:每个应用程序的电池使用量 >
I am making a demo for battery usage percentage by all apps.I am able to get the total available battery percentage but want to get battery usage by percentage by each app separate.So Is there any way to do so as lot many apps are available in market.Please help or suggest to save newbie.
Only battery usage screen in Settings, where you can see battery usage of each application. There is no API or command-line way to get this information. See similar question discussion in stackoverflow :Android: Battery usage of each application
这篇关于如何以编程方式获取每个应用在Android中的电池使用百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!