General Timer/Countdown

Good day guys. Sorry for disturbing. I have searched the forum for this question and gotten at least 60% of what I need. But i still need more help. Here is what I wish to do, I need to disable a button for every 5 minutes in my app for all the users. Whether online or offline, the app should automatically toggle on/off the button every 5 mins. I have managed to use Pixiie method to have a countdown with firebase, but I found out that it will only work on each user depending on the user’s interaction with the button. Example
If a user clicks that button, it disables it for 5 mins for that particular user, but I want it to have a particular time it is on and time that it is off. Please can anyone throw a light for me on what to do?

Create the time control for each registered user. Use a user id and associate it with this on / off time.

1 Like

Please can you elaborate more. I already created an online timer using Firebase. But that timer works indivudually. What I mean is that the button i want it to be on and off is toggling based on each user’s time of interaction. But i want it to be general in the sense that whenever anyone logs on, the timer that controls that button will also be the one that controls for every other user

I do not know if I understand. Do you want or not individual for each user? If yes, put a control (I work with Relational database) I would put Fields with the times for each user.
id— timer_on —timer_off
1 08:00 08:05
2 09:23 09:28

Drag A Clock Sensor .


In The Property Set :

In The Blocks Section:

Hope It Helps…

2 Likes

Super :heart::heart::heart:


i dont think you need any countdown connected to firebase to achieve your goal.

( maybe i am wrong :sweat_smile: )

Use Online API time.
When you get the time,
if minutes are equal to and between 0-5, 11-15, 21-25, 31-35, 41-45 and 51-55
then keep button enabled
else keep it disabled

0-5, 11-15, 21-25, 31-35, 41-45 and 51-55
this is a 5 minute interval
you can change it accordingly

and if you store the interval as a list of minutes in firebase like -
1 2 3 4 5 11 12 13 14 15 21 22 23 24 25 31 32 33 34 35 41 42 43 44 45 51 52 53 54 55
and then call the list and compare it’s vaues with the ongoing minute it will become easy to impliment, modify directly from firebase and will also save a plenty of blocks.

2 Likes

Thanks so much guys for all your replies. This is exactly what I needed. Honestly I’ve thought about it before but thought there would be maybe a countdown or timer extension walk-around on it.
Thanks to all those that replied. Thank you

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