我们如何计算/要知道,有多少电池寿命我的用户定义的应用程序使用? [英] How can we calculate/ to know, how much battery life my user defined application utilising?

查看:232
本文介绍了我们如何计算/要知道,有多少电池寿命我的用户定义的应用程序使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面我想问的是,我们可以找出我的Andr​​oid应用程序有多少电池寿命使用。因为我开发了基于GPS以及网络,服务,广播接收器应用程序,所以我有电池消耗的问题,所以首先我想要知道多少电量百分比是如何使用我的应用程序。任何想法。
先谢谢了。

Here my question is, can we identify, how much battery life my android application is utilising. Because I developed an app based on GPS as well as network, service, broadcast receivers, so I have battery drain problem, so first of all i want to know that how much battery percentage is my application using. Any idea. Thanks in advance.

推荐答案

这是很难说究竟有多少电池寿命使用特定的应用程序。但是,你可以参考以下链接可以给你一点想法。

It is difficult to say exactly how much battery life is used by specific application. But, you can refer following links which may give you a little idea.

<一个href=\"http://www.androidcentral.com/new-google-services-uses-more-battery-old-and-google-needs-fix-battery-screen-already\" rel=\"nofollow\">http://www.androidcentral.com/new-google-services-uses-more-battery-old-and-google-needs-fix-battery-screen-already

<一个href=\"http://lifehacker.com/5990553/betterbatterystats-tells-you-exactly-which-apps-are-draining-your-androids-battery\" rel=\"nofollow\">http://lifehacker.com/5990553/betterbatterystats-tells-you-exactly-which-apps-are-draining-your-androids-battery

<一个href=\"http://www.howtogeek.com/139592/how-to-find-the-root-cause-of-your-android-battery-problems/\">http://www.howtogeek.com/139592/how-to-find-the-root-cause-of-your-android-battery-problems/

编程,你需要保持BatteryManager记录在您的应用程序本身你的应用程序。

Programmatically, you would need to maintain BatteryManager logs for your application in your app itself.

关于,GP​​S,网络,服务,广播接收器等,这取决于你如何实现它的电池使用。例如: - 使用被动提供商,而不是GPS或网络服务提供商也可以使用setinexactrepeating方法警报管理等

Regarding,battery uses of GPS,network, service, broadcast receivers etc. it depends on how you implement it. Eg:-Use passive providers rather than GPS or network providers also use setinexactrepeating method for alarm manager, etc.

这篇关于我们如何计算/要知道,有多少电池寿命我的用户定义的应用程序使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆