Thank you I will see to adapt it to my project.
@Still-learning
Hello,
I just tested.
The countdown starts well at 5 min and decreases.
On the other hand, when I go to another screen and return to the countdown screen, the countdown no longer decreases but resets to zero and increases.
Example :
I leave screen 1 with a timer at 0d 0h 4m 34s
When I come back it goes to 0d 0h 0m 0s and makes an increasing countdown.
See solution provided in
firebase.apk (5.2 MB)
I have used the above procedure…
Just hit start button, go to screen 2, press back button to return… also close the app and reopen… and tell me whether it is continue from where it left or restarting from zero…
I mis read your topic, I think… actually you want where you left… But my design is just it will goes on decreasing… little arrangement will solve, just save the remaining time in tinydb and start from that point when screen initialise
In the spirit, yes it is that of going from one screen to another and when we return to the 1st screen the countdown continues.
But I misspoke when I said that when I returned to the 1st screen, the countdown resumed where I was. I actually meant it continues to count down while I’m on screen 2.
Example :
I leave the 1st screen at 4m 30s
I’m going to the 2nd screen for a while
I return to the 1st screen afterwards with the countdown updated to for example 3m 30s if I spent a minute on screen 2.
Ok let me modify it. Also what will happen in both screens if time elapsed ?
@Still-learning
that’s exactly what i want to do yes.
It also works well with the app closed and when switching screens.
what is your aia?
Thank you @dora_paz , your solution is good but @Still-learning brought me the solution beyond my expectations with the stopwatch which continues even with the app closed.
It remains to be seen the aia he uses.
I used airtable instead of TinyDB to store the time values.
I can try to adapt what you put there Clock remains active when changing screen - #7 by Still-learning
but I do not get the result of your APK.
the point is, where and all i used get tinydb tag value, you must use your airtable value… and where and all i use save the tinydb value you must use save to airtable…
finally I succeeded.
I resumed all my components and I had an error that directed to global_final and not global_initial
Which is why it was reset to zero instead of continuing the countdown.
It works perfectly as you had shown.
A big thank-you.
I still have to adapt to put on airtable.
Sujet résolu.
@Still-learning
I have one last problem, I would like the counter to be in the format 0m 0s and not 0d 0h 0m 0s
i tried with this
it doesn’t change anything
try split the vaue at spaces and use select list item list index 3 and 4 alone… simple
try like this (modified as per your requirement)
Hello,
Sorry for the late response.
It’s perfect.
I concluded that the Gobal_initial component was no longer useful.
Many thanks to you.
Yes, actually i removed it but without saving it I sent it to you it seems…
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.