How do you store a timer value in Tiny databases

No but thank you

Ok, but should it continue counting there after restarting the app or should it start again at 0?

I would make it restart after closing the app

show us the code you have done, at least we need to know how it counts, then we can direct you the right way.

As, every HTTP requests can be logicaly grouped using sesion object, here, also every screen call is a seprate call, what about, calling/opening new screen with parameters, as

Here you can check both options:

ezgif.com-gif-maker (1)

(Video showed in 1.5x times faster)

How about showing your blocks in full so that other users can more easily follow your approach?

1 Like

This is just my simple logic...

Sure, but what does this have to do with the solution marked in post #15 (which at least was previously marked as a solution)?

After your post only seeing that my gif post was marked as solution.. well, post#15 marked as solution? Well it have no relation with topic or query I think..

I just shared my view, may be even more simple way we can short it and if I come to know let me share it

And what is after restarting the app? It continiues ... but the OP wants to restart it at 0 (if I understood that correctly).

In such case user can use one exit button. And on clicking it save the tinydb counter value to zero.

Yes, but there are several other options to leave an app, eg device Back button, Home button and killing the app via task manager ...

Also it is not necessary to disable the Timer because it is disabled automatically if the screen is closed.

grafik

1 Like

This is not a solution (because it continues counting after restarting the app).

Another open question would be what should happen to the timer if Screen1 is no longer visible, eg the home button was pressed. I would assume that the count should not continue, but only as long as Screen1 is visible (i.e. in the foreground). Questions over questions... :wink:

I have solved the problem thanks to your and everybody else's solution, thank you

Please provide a screenshot of the solution to help others with similar questions in future
Thanks
Taifun

I will as soon as I can

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.