You are reading a single comment by @Purple-Tentacle and its replies.
Click here to read the full conversation.
-
It is a widget counting down and displaying time.
Each second 1000 ms are substracted from the counter.
The counter (time left) is written to a file each second, to not lose progress.The user interaction is done via an app to set hours, minutes, seconds and to activate the timer. When activated, the widget is shown.
There isn't enough detail here on what and how the widget works, or how the user interacts with it. So can only guess. One idea might be to build a watchdog using
setTimeout()
and reset the watchdog every time the user interacts, (moves, presses button, etc) otherwise, save file (storage) and dismiss.