Secured Countdown Extension v2.0 [PAID]

Some apps allow users to get extra coins or gems by pressing a button or by doing a task every few minutes of time like for instance, “Clash Royale” lets you open a chest of rewards every 24 hours and then you have to wait for another 24 hours. The task can be anything like spinning a wheel once a day (or once an hour), or scratch a card once in 24 hours, etc…

If your app needs a similar element, then you’ll find this extension pretty helpful.
It is possible to create such a mechanism using only blocks by converting date and time into the countdown. But it is a tedious task and much more complicated than you’d think. To make the process easier, I have created this extension that anyone can integrate a real-time countdown timer in their apps with ease.

Note that this extension uses standard time from API (worldtimeapi.org) and not the local device time (this is preferred so that users won’t be able to hack/ exploit the countdown by hampering with the clock settings in their phone).

Components you will need:
A clock
A label (if you want to display the countdown)
A button to start the countdown
And… The extension obviously! :stuck_out_tongue_winking_eye:

[details=“Extension blocks:”]

component_method (2)

GetCountDown: Returns a list with days, hours, minutes and seconds. Argument must be formatted correctly like dd/MM/yyyy hh:mm:ss a.

Use index 1 for days, index 2 for hours, index 3 for minutes and index 4 for seconds. There is only EndDate parameter and no StartDate. As the start date will always be the current time, you will only need an ending date for countdown.

NOTE: This block doesn’t have a timer, it will only return countdown. To start the countdown, you must use a clock component.

component_method (4)
GetCurrentTimeFromAPI: Get current time from API (worldtimeapi.org). There is no event for this block as this block will provide the current time input to the “GetCountDown” block internally. So just use this block before starting the countdown.

component_method (5)
UpdateCountdown: Updates the days, hours, minutes and seconds in the countdown list. Use this block on “On App Resume” event.

component_method (6)
ConvertTo12HFormat: Converts date and time to 12 hour format.

component_method (7)
ConvertTo24HFormat: Converts date and time to 24 hour format.

There are total 5 blocks.

HOW TO USE:

VIDEO DEMO:

Extension price: INR 150 or 2 USD only.
PM me if you want to buy the extension.

Note that this extension uses online time from API. The website may go down in future and the extension may not work properly.

Click here to download demo APK.

Thanks and regards,
Aditya

11 Likes

Can you show the blocks and how it works?

1 Like

Hi @Aditya_Singh
Good job. :+1:
Keep it up :slightly_smiling_face:
I have a question.
Does this extension run in background?

2 Likes

I’ve added the extension block in the post. I will upload the details on how to use this extension shortly.

Thanks a lot!

No it doesn’t work in the background but if you reopen the app, the countdown will be updated automatically. You just need to store the EndDate in Tinydb. I will upload an example soon.

1 Like

most awesome extension i ever saw !! just bought it.

1 Like

Glad you liked it :slightly_smiling_face:

Well, looks like it doesn’t…
(See these 2 videos, can’t fit in one because of community file size limit)


5 Likes

nice effort but i am doing that without extension. :laughing:

1 Like

Ohh! It’s working absolutely fine for me…I also tested this on my friend’s phone. But thanks for reporting the bug, I will check it out.

Congratulations! :clap:

1 Like

good job
But you can do that without extension

1 Like

Thank you…

Yes, I know it is possible to do this without an extension. But the blocks can be tough or confusing for beginners who are new to Kodular!

Well said… Keep it up, you are contributing it to our community…It will save time for those newbie and blocks. Effort appreciated

1 Like

Thank you so much :slightly_smiling_face:

It’s awesome! But i have a question.
Is your extension comparing the END Date with Device Locale date&time or internet/Online date&time?

1 Like

I am using online date and time and the end date will be set manually by the user. There is some bug in the extension and I’m fixing it. The demo APK will also be updated soon.

:smile: Hope you are not new in extension development. i have tested your APK it’s taking the device date&time.

Okey… let us know when you are done. Really waiting for this cool stuff…

2 Likes

Sure, I will let you know, thanks!

You can test the demo APK now, I’ve fixed all the bugs.

1 Like