Daily free task

Hello guys i need help how can i create an Daily free task, like every day user can get free points in app.

Its an Earning app, if I am not wrong :expressionless:

i dont want to use in earning app is different

This isn’t necessarily an earning app. Could be for a game where you can spin a wheel once a day for a boost or extra coins.

Use the clock component and tinyDB, there are topics available about this already.

yea but i also want to show time until daily become available again like 05h:11m:10s

Hopefully there is less messy way but this puts it in the format hh:mm:ss.
The procedure above the input is the duration in millis and the timeFormatted stores the output.

1 Like

good and how can i get this to show in label? also once reach 0 can able to set a button to claim the free points or coins, then once claimed will start again from 24h?

For this you can use blocks if then, else if, else and use it to your needs.

You might also check this extension out:

1 Like

Just downloaded the extension but i dont know how can i build the block to work. Anyone can help?

Have you looked at the blocks in Extension topic? It’s all there what you need, please have a try, if you don’t manage to get it working, please provide some blocks you have tried, then I, or someone else will help you :wink:

i will try now

1 Like

ok just done with blocks what can i do now?

You done with blocks, what blocks? Pleae share some blocks so I/we can help further :slight_smile:

I don’t see anything else than the blocks provided earlier from @Saezy.

I told you to check mentioned extension, you told me you downloaded and had set up blocks, I asked for the blocks, but you provide only blocks given by Saezy.

You should add date/time to a db(database) or in a file in a directory.
When app opens it will check(compare) if time atm is ex 24h later then stored time in db or file in directory.
If time is more then 24h later you make button active, and gives reward or whatever on click. When reward is given you disable button and store new date and time into database/file in directory.

Have the extension but dont know how to use this and also dont know how to build with them.

Do you know how to use the clock? if not you should read this guide:

When you have read this :point_up: I’m sure you know how to get date and time.
Then you can do this :point_down:

To compare time I also found this extension:

Ok i will look tomorrow at this

Use web component to call for todays date. If today’s date is not equal to tindydb saved date, then add points. Also save the today’s date in tinydb

1 Like

ok i will try tomorrow.