Estimating time until battery is depleted for Android phones programmatically -


so there ways current battery levels via listener. however, these give values of phone's current battery state, no indicator of how fast/slow rate @ battery draining.

what way estimate time remaining until battery depleted? can knowing voltage is? or perhaps monitor rate @ battery drains on period of time , extrapolating it?

many thanks.

if keep track on time period, perhaps every few seconds, can keep track, , can extrapolate, can keep perhaps 100 values in circular array , keep taking average, there can 2 numbers, 1 average on longer period, may out spikes, if spike new norm, perhaps use 10 values calculate.

so, have 2 numbers can show, give user idea how longer battery last, showing range of time left.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -