Page 1 of 1

Time tracker

Posted: 11 Jul 2018 16:23
by Luca.Biraghi
I've created a simple flow to track time. The behavior is quite different from the one used in the various app available on the store. These apps have a timer running during the activity. My flows act differently. They store the initial activity time in a variable then, at the end of the activity, calculate the amount of time.

This is how it work:

The time_tracker flow is launched with shortcuts. You can create as many shortcuts as you want depending on the number of activity you want to track. Just give the shortcut a name with te activity you want (in the record the _ character in the name will be replaced with a space).
Once you launch a shortcut a notification will appear with the activity name that is running. At this point you have two choices: stop the activity by pushing the stop button in the notification bar or by launching the same shortcut or you can launch another shortcut. In this case the new activity replaces the one in the notification bar and the previous activity time will be recorded.

The data are appended in the file Time tracker.csv in the Automagic folder so it can be mined with a worksheet software.

The flow records the date of the activity, the week day, the week number and the amount of time spent on the activity in minutes. The csv just need to be filled in the heading rows with these field name in the language you want to track your activity

Due to the fact that the flow does not use a timer, but does a time difference calculation on the beginning and ending time, this avoids device restart problems. In fact if you restart the device, the flows just launches a notification with the activity name that was previously running. At that point you can stop it any time and the flow will calculate the exact amount of time since the beginning before the device restart.

Hope this can be useful to someone else.

Cheers

Luca Biraghi

http://automagic4android.com/flow.php?i ... c9f3d1fe94