Hello, I made a counter that counts backwards, there is no problem with it, but the counter does not work while the application is running in the background.
No need of background task
On button click to start the timer, save the final time (in milli) , then compare with current time (in milli), shiw the difference between these two… simple
I will send you a video as soon as possible
sorry i came late Anyway, let’s get to the topic, first of all, I put the application in the background at 5:50 without any problems in the application, but I do not delete it, when I enter it again at 5:50, so the counter does not progress while the application is in the background.
Use the PnPause and OnResume events from the Screen drawer and follow the suggestion
Taifun
Thanks I will try again tomorrow
I tried something like this, but it didn’t work, the same thing happened, only when I put the application in the background and enter the counter, the counter drops for 1 second.
By the way easydialog to show the warning I am using the plugin
Maybe You can try this
What are the blocks that make it work in the background, I need them
It’s a loop countdown and all automated. No need to run in background.
so how can i run my blocks in background i am not making games and i am sending Verification code while user is registering this is her counter
As i said. This doesn’t need to be run in background. It will work even if the app was uninstalled. But the timer you need to adjust to fit your need.
Maybe you should test it out to know it better. It’s just not all about game.
Is your meter like in the video above, can we set the minutes of preservation and does this device not tire if it works even when the application is closed?
Yes it can be adjusted to work with your OTP limit system. If you can provide a sample i can help you with the adjustment.
Also you can use the method provided by other member. It’s similar.
well, can you briefly tell me how to do something, when the code is sent, the counter must be active, it counts down from 5 minutes.
You can set the current time in a tinyDB for example. If the time when user requested a OTP was 05:03:23 than you can set a another value in the DB for next retry like ,05:08:23. For countdown timer, you can just apply the method already mentioned by other member. You can then make the OTP available if the time when user tries to request exceeds the next retry time.
Thanks I’ll test and repost
Simply use screen initialise event alone
Already said what to do. It is just a trick with tinydb and clock timer with 1000ms interval , that’s all. If you want accurate reading thne web component needed to get online time
I want to ask something, what are you saying, I don’t understand, can you show me the block?(mili the block you say)