I have a problem. In my app there is a timer. When the timer has run out, the user must perform a task. The timer is different in length depending on what the user has chosen. But usually between 5 toll 30 minutes. The user will have the mobile phone in his pocket with the screen off.
Now it turns out that the timer does not tick when the screen is off, its stops completely.
Is there a solution to this?
Hi there, I saw a similar problem a while ago but i cant find it. From what i remember, the solution was that you need to keep the phone awake because other wise the timer stoped working and theres no way to make it run with the phone in sleep mode. If you want you can achieve that by using the set wake Lock formula in the global canvas or in the page that you dont want to go to sleep.
I hope it helps you
Thanks Dimos! I found the posts you referenced. Not much to do about it, I have to come up with another solution to my problem. Maybe let a timer tick on the server and not in the device. A challenge, but certainly solvable.
Forgot to write that it is not enough to have the screen on, waste the battery
yeah your point about the battery is true, but the solution depends on the amount of time you need to count for example if you need a triger every ten minutes its something doable in the backend, if you need a triger every second, you need a call every second but again its not something impossible.
Following up on this. Is there really no way to have a timer continue counting with the screen off? Or is there a way to set a timer on the phone’s native clock / timer app?
My app would be so much better if this were possible. Keeping the screen awake is certainly an option, but annoying.