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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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