Can I prevent screen lock, or maintain state after waking from screen lock?

My app contains a timekeeping function, so people use it to time races. However, sometimes in the middle of the race, the screen will lock, and when they open the phone up again, the app resets itself.

Is there any way to maintain the app’s state (ideally letting the timer continue) or to prevent the screen from locking?

Hi! You can use set wake lock flow function to do exactly this!

1 Like

Worked perfectly, thanks!