by angrygoat · 5y ago · 0 comments
Delaying maintenance can help too, and that also helps reduce occurances of power failed during complex data operation and the resulting difficulties of resuming from a partial operation when the state may not have been fully persisted at any point, because filesystems and abrupt power loss don't tend to go so well together.
There's a lot of reasons why an app might want to know the battery status, and most of them are for the user's benefit.
Then, depending on what your app does, you can act on a few things to reduce, or not, battery usage when it gets below some thresholds: reduce GPS precision, remove some animations, limit framerate, make less networking requests, ... It could be limited by the system, but it would probably not be as wise regarding to what is important in the context of one app vs another.
We have numerous cases where we adapt to the battery level so the user can get the best of our apps and not empty their battery while they still need it.
However, in this case, the phone has a battery meter and provides its own low battery warnings. I imagine you could have more sophisticated battery use tracking apps than Apple provides but, in general, not sure why you would legitimately need this info.
(Seems like many others do too!)
I think this results in a much better experience for everyone on the call.