nyxkn / meditation

Essential meditation timer for Android
GNU General Public License v3.0
27 stars 2 forks source link

Intervals keep the screen on #4

Closed Mrnofish closed 1 year ago

Mrnofish commented 1 year ago

Whenever an interval triggers, the screen turns on and stays that way. It doesn't seem to dim or turn off as it normally would. "Keep Screen On" is disabled.

nyxkn commented 1 year ago

Thanks for the report!

Intervals are currently implemented using screen-wake notifications as that's the only version that seemed to work reliably, but ideally in the future I'd like to get them to work without waking the screen.

In any case, after the screen has been woken up by the interval notification, it should go back to sleep after the usual time that you've set your screen to sleep after. Does this not happen?

Mrnofish commented 1 year ago

It wasn't happening the other day but it's happening now, so I'm not sure what gives... I'll re-open this issue in case I run into it again.

Intervals are currently implemented using screen-wake notifications as that's the only version that seemed to work reliably, but ideally in the future I'd like to get them to work without waking the screen.

If you could use some inspiration, here's an app that does something similar without the turning on the screen. It does support posting a notification on each interval, but only brings up the ambient display on my device, which seems better to me, as the device doesn't get unlocked and screen off is not subject to the regular delay.

Since meditation timers are used mainly while meditating with eyes closed or unfocused, I would imagine triggering nothing other than an audio notification would be the preferred option, but who knows.

https://github.com/jenspfahl/BDT

nyxkn commented 1 year ago

Thanks!

I agree, ideally screen shouldn't have to turn on at all. But I had found it quite difficult to have reliable timers otherwise. I definitely plan to look into it again at some point.