I am creating a workout app that has a countdown timer.
When the timer hits 0 seconds, the action is to go to the second screen
There is also a button on the same page with an action to go to the second screen
Question 1:
When I press the button to go to the next screen, the countdown timer still runs in the background and reloads the page once it hits 0 seconds, even though I am already on the second screen. Is there an easy way to cancel the countdown timer’s action if the button’s action is executed?
Question 2:
When I am on the second screen and press back to go to the first screen, the countdown timer is set at 0 seconds. Is there an easy way to have the timer reset to the default amount?
When I set a countdown timer (in a list) on the first screen for 10 seconds, but press the “next” button (also in a list) with 2 seconds left on the timer, it will go to the next screen, but then the page will reload again 2 seconds later as if the timer still carries over.
Has anyone experienced this too and know a workaround?
This works for the timer, but then I get the missing data links for linking back to a screen.
Does anyone know a workaround solution for this as well?