How to get percentage of battery usage by each app

2019-03-31 06:20发布

问题:

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