Thursday, October 30, 2014

Need a quick mobile prototype? Tasker to the Rescue!

A couple of weeks ago I was browsing the Tasker ChangeLog when I noticed this entry:

event: Steps Taken (Android API 19+)

Interesting. I checked, and sure enough the pedometer on my Galaxy S5 is now wired into Tasker. Specifically, you can have Tasker perform some action when you hit a particular step count (at which point, the step count resets, and you start approaching it again).

I found this functionality terrifically cool, but for the life of me I couldn't think of a practical use for it. After much brainstorming, a half baked project came to mind. What if I plotted my location every 1000 steps. Would results be of interest? (Either as useful personal metrics or maybe just as art).

The more I thought it about it, the more I became curious: would the trail of digital breadcrumbs I left over the weeks and months be of value?

Now that I had my idea I had a new problem: when the heck was I going to find time to implement this bad boy? Probably never.

So I've decided to punt. Yesterday, I setup this new Tasker task:

Profile: Step Loc (41)
Event: Steps Taken [ Number:1000 ]
Enter: Anon (42)
  A1: Get Location [
    Source:GPS Timeout (Seconds):100
    Continue Task Immediately:Off
    Keep Tracking:Off
  ]

  A2: Write File [
   File:Documents/steploc.txt
   Text:%TIMES,%LOC
   Append:On
   Add Newline:On
  ]

Now, every 1,000 steps a two line task is triggered. First the GPS location is calculated, and secondly, this value (%LOC) and the current Unix time (%TIMES) is appended to a data file.

This allows me to start collecting the location and time data now, and if I choose, I can play with it at a later date. If there's a trend there, I can make a more formalized app.

While it's not a slick, real-time visual based solution, it did have the benefit of taking me all of two minutes to write.

Will this little project, if you excuse the pun, lead me down a useful path? I don't know. But I know that I love Tasker for it's ability to quickly prototype concepts just like this one.

2 comments:

  1. Tasker will soon be considered a programming language seemingly! That is great.

    ReplyDelete
  2. It really is one. It's got strange roots as a sort of automation framework, but as keep finding out, it's way more than that.

    On a related note, when it comes to learning to program, I think finding a language that lets you solve Real Problems is essential. And most of us don't need to calculate Fibonacci sequences, so many coding examples are useless. We do, however, need smarter phones - which is why I think Tasker is an ideal language to learn to program in.

    ReplyDelete

LinkWithin

Related Posts with Thumbnails