dubrowgn / wattz

An Android battery power status bar indicator
MIT License
183 stars 9 forks source link

Estimated battery time left indication #42

Open cinnyboy opened 1 month ago

cinnyboy commented 1 month ago

Is it possible to implement an estimated time left in the wattz notification? I think it would be really helpful to have this information and not jump deep into Android battery settings.

dubrowgn commented 1 month ago

This would certainly be possible, but the Android SDK doesn't expose anything. We can estimate it ourselves, but the question then becomes, "how"? Simply dividing energy by power technically works, but would exhibit a lot of variability. Some kind of moving average probably makes more sense, but then which one? Hmm...

cinnyboy commented 1 month ago

Default Android algorithm is surprisingly precise, at least in my case. I think if possible, it would be best to try and emulate it. That's what I would suggest. I hope there will be more users interested in such functionality, who will eventually chime in.