计算电池剩余电量 [英] Calculating remaining time of battery live

查看:143
本文介绍了计算电池剩余电量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以以小时和分钟为单位计算剩余电池时间?另外,是否可以根据我是否正在使用某个应用来计算该时间?是否有可能获得此类信息?如果可以的话,请给我建议.

Is it possible to calculate remaining battery time in hours and minutes? Also, would it be able to calculate this time depending on if I'm using a certain app? Is it even possible to get such information? If you could please give me advice on how to do that, I'd be very thankful.

推荐答案

估计剩余电池寿命是基于分析的.正如其他人所说,您必须听听电池电量的变化,此外,您还必须跟踪它们.一段时间后,您将有足够的数据来计算电池的平均持续时间.此外,您还知道何时电池耗尽快,何时耗尽慢,因此您可以据此改进估算.您还将知道用户在什么时候为设备充电.可以跟踪和使用电池电量的事件很多.此外,您还可以跟踪屏幕的打开或关闭时间.计算剩余电池寿命的算法取决于您:)

Estimating the remaining battery life is based on analytics. As the other people said you have to listen for battery level changes and in addition you have to keep track of them. After some time you will have enough data to calculate what is the average time the battery lasts. In addition you know when the battery drains fast and when drains slow so you can improve your estimation based on this. Also you will know in what time the user charges the devices. There are a lot of events that can be tracked and using the battery level. In addition you can also track when the screen is on or off. The algorithm of calculating the remaining battery life depends on you :)

我希望这至少可以解释一下估计电池寿命的想法.

I hope this explains (at least a bit) the idea of the estimation the battery life.

这篇关于计算电池剩余电量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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