Tasker: The Android Equivalent of a Radioactive Spider-bite

If there is anything that counts as a “must-have” application for your Android phone, Tasker is it.

Tasker is the first Android app I ever paid to purchase, and is by far the most versatile I’ve seen.  I am convinced that with it, you can grant your Android the smart-phone equivalent of super-powers.

The best way I can think to describe the phenomenon that is Tasker is that it allows you automate almost anything you can do with your phone.  You do this by creating macros.  You can execute these macros manually, just like starting another application, or (and here’s where the true power of Tasker comes in) set the macros to be triggered automatically based on context.

“Context” can be a number of different things.  In addition to being able to detect what applications are running on it and details of the information stored on it (just like any computer) the typical Android has a number of built-in gadgets that allow it to detect all sorts of other things, too: cellular radio, GPS, Wifi, accelerometers, magnetometer, microphone, camera, etc.  Tasker can be set to be aware of the state of any of these detectors and automatically kick off whatever macro you’d like, based on the situations you define.

I’ll explain what I mean by walking through an example.  Today, I’ll use a fairly simple example, but it should be enough to give you an idea of the kinds of things Tasker can do.  In future posts I’ll give other examples of things that Tasker is getting my Android to do.  Most of what I’ve done is to add simple conveniences, but Tasker will allow you to do some fairly complex things.

For now though, I’ll describe a very minor power that Tasker has granted my Android.

Impersonating a BlackBerry

Before the Android, I used a BlackBerry.  One of the features the BlackBerry has is its ability to detect when it’s in its holster and let you set the notifications differently based on whether the phone is in or out of the holster.   (The BlackBerry does this by detecting the presence of the magnet used in the holster’s closure.  It also shuts off the screen and keyboard upon detecting this so there are no accidental key-presses in the holster.)  Typically, I used this to have my phone ring out loud when it was unholstered, but only vibrate while holstered.  I grew used to this default behavior.

Later, I switched to the Android, had to buy a case with a belt clip, and suddenly realized that there was no built-in concept of “holstering” for Android.

Tasker to the rescue.

Tasker is built on a hierarchy.  You define the Actions you want it to take.  A set of Actions defines a Task.  The Tasks are performed based on Contexts you define.  The Contexts are grouped into Profiles.

It’s a very logical structure built from the ground up.  However, it seems that whenever I set out to do anything in Tasker, I end up building it from the top down.

My first step in having my Androd impersonate a BlackBerry was to create a Profile.  I named this Profile “Holstered” since it will define how I want my phone to behave when it’s in its holster-equivalent.

That presented the first obstacle.  My phone didn’t come with a holster.  Instead I bought a clamshell sort of cover (which I’ve since modified) and a belt clip.  Fortunately, though, I’m a creature of habit.  I always wear the belt clip on my left side, with the phone in horizontal orientation in a way that makes it easy for me to take the phone out of the clip with my left hand.  (I’m right-handed.  This arrangement allows me to answer the phone while I’m doing something else.)

The Android knows what direction it’s facing (thanks to those accelerometers I mentioned earlier).  This allows me to define a Context based on the phone’s orientation — in this case when the phone in the right-side.  (It’s worth knowing that for the purposes of defining orientation, the Android uses your left and right as you look at the phone’s front face (the screen), not its left and right as if that face were its, well, actual face…)

Having defined the Context, I needed to give it a Task to perform if and when ever it finds itself in that Context (in this case, being on it’s right side).  I named this Task “Vibrate”.

There are two main types of Tasks you can have: ones that take an action, or ones that change a setting.  In this case I wanted to change a setting.  This was the only slightly tricky part.  It turns out that there isn’t a “Vibrate Only Mode” setting on the Android.  There’s a “Silent Mode”, but that obviously wasn’t what I wanted.

Not so obviously (at least to me) it turns out that Android considers Vibrate to be a special case of “Silent Mode”.  With that figured out, I create a Task that sets the phone to “Silent Mode, Vibrate”.  I then save the Action, save the Task, save the Context, and save the Profile.

Even after all that, Tasker doesn’t actually do anything with the new Profile until I tell it to “apply” it.  This is handy because you can turn off Profiles without deleting them, or not use a Profile that still half-baked.

Once the “Holstered” Profile is applied, any time I put my phone on my belt (and any time I leave my phone on its right side) my phone doesn’t ring out loud — it just vibrates.

Now here’s the really cool thing — when Tasker changes a setting it remembers what the setting used to be.  That way when the Context no longer applies (if, for example, I take my phone from the clip and place it face-up on my desk), it restores the original setting (well, unless I’ve created an “exit action” that would override this, but that’s an advanced feature and this is an introduction).  That way, if my phone were set to ring really loud, it would only vibrate if I holstered it, but it would go back to ringing really loudly when I removed it.  Likewsie, if it were set to full-on Silent Mode, it would vibrate if I holstered it, but would go back to full-on silent when I removed it.

What Super Powers Do You Want for Your Android?

In future posts I’ll show how to create other types of Profiles and Task I find useful, including how to create Contexts so that your Android will take specified actions (or change its settings) when it’s in a particular location (there are at least three different ways to create location-based Contexts). Hopefully, I’ll be able to include screenshots next time (I was not at all successful in getting that to work today).

What would you want your phone to do?  If you could automate any function about/for/with your phone what would it be?

I bet there’s a way to do it with Tasker.

One thought on “Tasker: The Android Equivalent of a Radioactive Spider-bite

  1. Pingback: Most-Read GeekFluent Posts of 2012 | GeekFluent

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.