Time Tracking With Tasker

android, android-auto, productivity, tasker, timetracking, lifelogging, projects

I listen to the podcast Cortex when I’m driving, and they got me interesting in looking up time tracking and how maybe this would benefit me. I already use Rescuetime with Exist as a measure of sleep, productivity, social media posts, and other things that correlate to these like the weather, the length of the day, and more. It’s pretty neat and I look at it several times a week.

 Photo of clock

One metric it misses is driving time. As someone who drove 17,000 miles in the last 12 months for work this is pretty key to me. Apparently rescuetime can do it with an expensive add on, but that only works in the US so that’s no good.

I had a look through the rest of the Exist integrations and nothing really supports what I want. So, I’ve found another way of recording this information directly. Sadly it won’t be with the rest of my Exist data but aTimeLogger generates its own fancy graphs and allows me to export the data to standard formats.

Screenshot of aTimeLogger

Android Auto –> Tasker –> aTimeLogger #

Basically the flow is as follows. You could also automate this based on connecting to a certain bluetooth radio, or even just an NFC tag you have stuck to your dashboard.

  1. Plug my phone into my car with Android Auto.
  2. Tasker notices the change in UI mode
  3. Tasker sends an intent to aTimeLogger to start timing.
  4. Disconnect from my car
  5. Tasker notices the change
  6. Tasker sends another intent to aTimeLogger to stop timing.

To get this working, add your groupings to aTimeLogger. I added a top level grouping of transportation with train and driving inside this grouping. I guess I’ll add flying to this at some point too.

Once this is done, go into Tasker and create two new tasks. One for when you plug your phone in, and one for when you disconnect.  The task below is for when you connect your phone, and is explained line by line: