LibreShift / red-moon

Android screen filter app for night time phone use.
GNU General Public License v3.0
653 stars 82 forks source link

option to auto-restart #310

Open alex-tee opened 2 years ago

alex-tee commented 2 years ago

Is your feature request related to a problem? Please describe.

something is causing redmoon to exit. not sure if it crashes or my other apps temporarily use too much ram. I notice it happens when I have heavy apps running.

Describe the solution you'd like

Please add an option to auto-start red-moon so that if it dies it restarts itself with its previous settings

Describe alternatives you've considered

none, I just restart it manually and it's tedious

Additional context

-

smichel17 commented 2 years ago

I don't think this is possible, because I don't know of a way to detect that the app has crashed. I suppose I could set a repeating timer to start Red Moon every minute or so, which would have no effect if it's already running but would restart the filter if it were not running. However, this might have effects on battery life.

I'd rather figure out how to avoid the crashing in the first place. #329 might help with that, since Android gives higher priority to accessibility services (in other words, they are less likely to be killed to free up memory).