Hello Niotron community!.
Here is simple guide for the neebies who are eager to create unhackable timer.
Requirements;
- web part
- Labels
- Button
- Database (in this guide i am using tinydb, But you can attach ghseet, firebase, etc etc for single user or for the whole user)
- two clock components ( one is main clock and another for timer clock)
- and my extension
Q.1. How it works?
I will get online time from this web url and convert it in to milli. Based on this milli i will initiate the timer
Q.2 Do i need be connected with net through the timer?
No. Certainly not. It needs net only at the inital timer & button click time.
Q.3. What will happen if the user started timer and close the app?
Dont worry. Once user started timer mean i will store the final milli into the database (tinydb). So after closing and reopne the timer , this app will look for tinydb timer value. If it exists, then timer will begin with remining timer. Keep in mind NOT FROM THE POINT WHERE HE IS LEFT
Q.4 While getting response from timer extension, Do i need to use any special blocks , i mean split text at somewhere?
No. My extension will takecare of that. It will display only the remianing time as 12m:12s format and not like 0d:0h:12m:12s
This is screen procedure ( here you can add your own logic, i have added tinydb)
Explained well in the image ioteself
This is the main procedure which executes whenever timer triggers. Do not change
Simple procedures. You can add your won but do not change the logics
Testing aia
SimpleTimerLinkedWithdb.aia (17.5 KB)
Plese test and if possible comment or hit like.
Tested in android versions less than 10 and found working.