Hello everyone,
I’m having trouble with a timer that should work across multiple screens in my app.
Goal:
I want to start a timer on Screen 2, then navigate to Screen 3 while the timer continues to run in the background, and finally go back to Screen 2, where the timer should resume normally (showing the correct time passed), not restart or freeze.
Issues I’m facing:
- In some cases, the timer is frozen when I return to Screen 2.
- In other cases, it’s not frozen, but it resumes from the same point as when I left Screen 2, as if no time passed in the background.
What I’ve tried:
I’ve tested different combinations of blocks, but I can’t get it to:
- Continue running in the background** when I change screens, or
- Recalculate the elapsed time** when returning to Screen 2 to simulate a continuously running timer.
What I’m looking for:
A reliable way to make a timer work across different screens, even when leaving the main screen where it was started.
Has anyone encountered this before or found a clean solution? Maybe using a timestamp method (storing the start time, then calculating the difference when coming back)?
Thanks a lot for your help!