How to get battery & mobile-data-usage of specific apps?

妖精的绣舞 提交于 2019-12-18 13:38:33

问题


Background

Starting with some Android version (don't remember which), Android has the ability to show battery stats and mobile-data-usage (3G...) of the installed apps, so that the user will be aware of such a thing and will be able to think if the app should stay or not.

I'm talking about those:

The question

I've seen some apps on the play store that somehow fetch this data and show it to the user.

How do they do it?

How can I get the battery stats and mobile data usage of a specific app?

Is there a tutorial about this?

The only thing I've found is getting the status of the battery (charging/not charging,...).

来源:https://stackoverflow.com/questions/23312038/how-to-get-battery-mobile-data-usage-of-specific-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!