如何找出我的android应用程序的电池使用情况
谁能告诉我如何在我的android应用程序中找出电池的使用情况
can anybody tell How to find out usage of battery in my application in android
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
谁能告诉我如何在我的android应用程序中找出电池的使用情况
can anybody tell How to find out usage of battery in my application in android
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
文档说您可以注册电池状态的更改事件。
您可以在以下位置查看它:
http://developer.android。 com/reference/android/content/Intent.html#ACTION_BATTERY_CHANGED
The documentation says you can register for a change event on the battery state.
You can see it at the following location:
http://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_CHANGED
您可以使用 BatteryManager 获取电池信息。
查看此电池信息链接。
You can get the battery info using BatteryManager.
Check out this Battery Info link.