Task Hour/Day + Countdown Timer + Prevent Hacking


You should be able to follow along easily if you are able to find blocks by looking at a screenshot. This video moves at a fast pace. You are expected to learn from the commentary and pause the video as needed.

This tutorial will teach you had to add a countdown timer to any “task”. The task can be anything. Maybe the user can only spin a wheel once per day, or the user can scratch a card once every hour. Maybe you just want to show a new joke or phrase every day. The app works by a using UTC timestamp (Coordinated Universal Time) rather than the device’s local time. (This way the user can’t change the clock settings on their phone to exploit/hack the event) The timestamp is stored in a Fusion Table (rather than a TinyDB, which is also prone to hacking). While this tutorial is more advanced than quick and easy solutions, it will help to keep your event more secure. Once a timestamp has been retrieved, a countdown timer will begin and will display on the screen with the time remaining until the user can interact with the event again. If you change the wait time, the countdown timer will also change to reflect the new wait time. Wait time is recorded in seconds.

NOTE: If the user attempts to change the date on their phone (in order to fast forward time) the app will not work (This is good, because this will further help prevent the user from trying to exploit the countdown). If the user changes the settings on their phone BACK to the original date, the app will pick up where it left off, without hurting the original timer.

YOU AGREE THAT BY DOWNLOADING THIS .AIA FILE you will ONLY use it for education purposes or as part of your app. Any apps published to Google Play using any or parts of this .aia file MUST legibly include the phrase “original app design by Pixii Bomb” either on the title screen or somewhere in the “About” section. ANY Or ALL parts of this project MAY NOT be uploaded to another youtube channel, website, or publication in which the uploader receives credit for my work. If you wish to use ANY part of this tutorial in a tutorial that you create, you MUST have my permission to do so.
If you violate any of the above terms, your channel/website/publication will be flagged for copyright infringement.
**Project .aia File: SecureDailyTasks.aia (77.1 KB)

Quick Solution for doing something once per hour/day: Tutorial - How to disable a component for an hour/day
Convert Unix Time API: http://www.convert-unix-time.com/api
Convert Time Calculator: https://www.calculateme.com/Time/Milliseconds/ToHours.htm

I Want To Set Daily Task Limit In My Application
I Want To Set Daily Task Limit In My Application
Daily security task error bad argument to +
Can anybody telll me how to make a simple timer?
Need Store data help
Tutorial: Spinning Wheel
Complete a process once in a day
How can i grab utc time from webpage?

Another great tutorial @PixiiBomb. This was asked a lot and not only in this community. I hope you don’t get a dayjob in chasing people that don’t respect your wishes. :grin: :+1:


lol I would be like Liam Neeson in Taken… I have a … particular set of skills…

MUAHAHA :stuck_out_tongue:


Glad i am here in the Netherlands. It feels saver. :rofl::rofl::rofl:


How to do this with Firebase and without fusion table


Really nice tutorial! Thanks for sharing


Thank you for the awesome tutorial, @PixiiBomb… Now, if anyone asking for hourly/daily tasks, i’ll just refer them to your tutorial…


Well I would use both tutorials.

Italo’s is the best option for a quick fix and for newbies.
I had some subscribers tell me they thought mine was a little difficult.

But this tutorial is really for people who are worried about their users changing the system time or hacking the tinyDB :slight_smile:


I didn’t have the chance to watch the video yet, but what happens if there’s no internet connection?


Well in the video, I tell people to use YOUR tutorial, because it’s best quick/easy/workable option.

A subscriber requested that I come up with a solution that:

  1. Did not use local time
  2. Did not use a TinyDB

In both instances, if the user did not have an internet connection, then my tutorial would NOT Be the best option, and yours would. (Additionally, mine requires a bit more knowledge of Fusion and APIs and would be more advanced for some users, meaning that your tutorial would be a better fit for that person)

The subscriber was concerned that the TinyDB file would be hacked and that the user would just change the system time on their phone in order to speed up time.
So my solution to that problem was to: store the data online and grab a UTC timestamp from an API.


Great tutorial and production @PixiiBomb


Very good tutorial, ideed.
For changing the device time, this solution is the best.
I was thinking some solutions for using TinyDB, you can implement some traps to failproof it. Like some encryption / validation. If the encrypted string is not right or the tag does not exist after the first run, then restart the clock. That way the cheater can’t mess with it because everytime they change something or clear the app’s storage, the clock starts again.

Tutorial - How to disable a component for an hour/day

hi , can you show us how to do in firebase also please.
thanks ms.pixii


You would just use the get/set blocks in firebase, just like the firebase tutorial I created.


thanks for reply, if you show in your previous tutorial please. (edit your previous tutorial)
that’s will be very helpful.
thanks in advance .
(take your time)
now 2:10 am here good night.


Hi, can you teach me how to do timer using firebase


Mam The .aia File Not Working … Problem Is :point_up_2::point_up_2: Please Advice Me How To Solve …


daily security task app is not function properly since last two days
i am getting error message while timer screen initialize
bad argument to +
the operation + cannot accept the argument:,[1521215731 1521215731],[84000]

someone can help me to resolve the problem


Please post your blocks


Are you also using PixiiBombs tutorial?