elastic-rock / KeepScreenOn

An Android screen timeout quick settings tile
GNU General Public License v3.0
131 stars 4 forks source link

Low battery deactivation #9

Closed Markus40 closed 1 year ago

Markus40 commented 1 year ago

There is a risk of forgetting to reactivate the timeout and draining the battery overnight.

A customizable minimum battery level could re-enable the timeout when the device drops below that level. If the timeout is disabled again below this level, it could work as normal and drain the device until it is empty.

elastic-rock commented 1 year ago

Thank you for your suggestion. The scenario of draining the battery can only happen if the screen is left on. Whilst I know people that leave their phone behind with the screen on, it is an immense risk from a security standpoint, as the device is left unlocked for anyone to tamper with. For this reason, I will still think about it.

elastic-rock commented 1 year ago

To be able to set the the percentage at which the timeout would be disabled, the app would have to periodically monitor the battery state in the background, which would have a negative effect on battery life. It would be better to implement the feature as "restore timeout when battery low", meaning the timeout would be restored when the system notifies the app, which it can do when it drops below warning level (20% on most devices). I have worked on this implementation and plan on releasing it after further testing and app UI redesign.