Posted 11 years 2 months ago.

I should thank my colleague Jacob Singh for introducing to me Tasker - The Android App which does the same as what Rules Module does for Drupal.

It exposes all of Android's internal APIs via a super cool interface and allows you to run set of actions on certain events. Viz Whenever {some event} happens, check if {some condition} is satisfied and execute {some action}. The list of events, conditions and actions available is huge and encompasses almost anything that you are allowed to do through your code.

One of the actions that I was interested in, was making a POST request to any URL.

This gave me an idea that I could set up some system to manage all the text (SMS) I receive. I have been looking for some integration of my SMS inbox with my computer for a while, but integrating it my website will make it more easier for me to access it any where any time.  

So I created a content type on Drupal, that holds the SMS with the following fields - Sender Name (from Contact), Sender Number, Text (body) and Date/Time received. Then I created a small php script on which includes Drupal bootstrap, which received the SMS details by POST method and saves each of the SMS as a node on the Drupal site.

I configured a new Tasker Task as

  • Whenever an SMS is received
  • Enable Wifi, Mobile Data and wait for 5 seconds
  • Make a POST request to the API URL passing the SMS Details
  • Disable Wifi, Mobile Data

Then I created a cool Drupal view listing all my SMS with pagination and exposed filters that would allow me to search, sort and filter messages as needed.

Has been working so far so good. Next I am planning to maintain my Call Log on so that I do not have to fumble for numbers when my phone battery is dead.

Some more Rules that I configured using Tasker

  • Whenever my screen is locked, if my battery level is less than 25%, close any wifi or mobile data connection.
  • When my battery goes to 2%, send an SMS to Spandana that my phone is going to be switched off soon, along with my Last know location, Location accuracy, Last Received call details, Last Dialled Number, Name of the wifi connection that I used last  (just in case I am kidnapped ;-)
  • Blocking all those Aircel Sales Numbers

Nice app worth more than its price (Rs 300 sth). Was fun enough to keep be occupied over a whole weekend.

Add new comment

Submitted by tanay on Tue, 03/12/2013 - 10:03