6063 comments
2357 subscribers
6181 on Twitter
Subscribe! Feed reader E-mail

Android Tasker: Setting time limits for Angry Birds and other timesucks

angry-birds

Angry Birds is our new household obsession. J- plays it on her iPod Touch. W- plays it on his Nokia N8. Me, I caved in and installed it on my Android phone. It’s a physics-based puzzle game with amusingly Rube Goldberg-ish levels. I tell myself that playing contributes to social bonds with W- and J-.

image

The game is set up as a long series of puzzles much like the screen above. When you finish a puzzle by destroying all the green pigs, you see one to three stars depending on your score, and you can either replay the level or move on to the next one.

Angry Birds is easy to learn and very engaging. I’m often tempted to check out the next puzzle even when I really should be going to bed. I tried using Tea Timer to give myself five-minute limits, but that took too many taps to set up.

Solution: Use Tasker to automatically set up a five-minute time limit for Angry Birds. That way, the timing is built in. I created a quick task that started whenever I launched Angry Birds, waited five minutes, and then returned me to the home screen. It’s enough to snap me out of the timesuck haze and remind me what I should be doing.

Here’s how:

  1. In Tasker, click on New and set up a profile. For the context, choose Application. Choose the application(s) you want to limit, such as Angry Birds. Click on Done.
  2. Click on New Task. You will be prompted for the task name. You can give the task a name if you want, or leave it anonymous. Click OK.
  3. Click on the + sign to add a new action. Choose Tasker > Wait and set it to the duration you want. Click on Done.
  4. Click on the + sign to add another action. Choose App > Go Home. This should keep the applications running, but return you to the home screen so that you can decide what to do next.

Instead of returning to the home screen, you might want to have Tasker bring up your task list, your calendar, or a note from your saner and more productive self.

image

I really like Tasker. =) It takes some getting used to, but it’s powerful. It’s like being able to defadvice Android applications. defadvice is an Emacs-ism that lets you specify code that runs before, after, or around other code, and it’s one of the reasons why Emacs is amazingly programmable. In addition to context-sensitive settings (like the way I automatically turn WiFi when I leave the house), Tasker lets me specify actions and settings that are active before, after, or around other things on my Android. I wish my apps exposed more functionality to Tasker.

Here’s the XML version, if you want to import it. tasker_angry_birds.prf.xml

<class cl="TaskerData" sr="">
  <class cl="Task" sr="task21">
    <id>21</id>
    <class cl="Action" sr="act1">
      <class cl="IntArg" sr="arg0">
      </class>
      <code>25</code>
    </class>
    <class cl="Action" sr="act0">
      <class cl="IntArg" sr="arg4">
      </class>
      <class cl="IntArg" sr="arg3">
      </class>
      <class cl="IntArg" sr="arg2">
        <val>5</val>
      </class>
      <class cl="IntArg" sr="arg1">
      </class>
      <class cl="IntArg" sr="arg0">
      </class>
      <code>30</code>
    </class>
  </class>
  <class cl="Profile" sr="prof15">
    <nme>Angry birds</nme>
    <id>9999</id>
    <class cl="AppContext" sr="con0" ve="2">
      <label0>Angry Birds</label0>
      <cls0>com.rovio.ka3d.App</cls0>
      <pkg0>com.rovio.angrybirds</pkg0>
    </class>
    <mid0>21</mid0>
  </class>
  <tv>1.0.13m</tv>
</class>
Short URL: http://sachachua.com/blog/p/21965
  • http://www.curiousmitch.com Mitch Cohen

    Tasker is a great app, I use it for a number of time/battery saving things on my Droid X, as for angry birds, I went with the low tech solution, I simply never downloaded it.

    Great example of using Tasker though!

  • http://sachachua.com Sacha Chua

    Mitch: Heh, smart move.

    I do actually like checking out something W- and J- both enjoy, and I don’t mind converting some of my subway podcast-listening or book-reading time to game time. In this case, having the temptation of a game on my Android is fine. =) Best to avoid it, though!

  • http://gwenhael.net Gwenhael

    There’s a typo in the third step, it should be Task>Wait

    I bought Tasker yesterday but I must say trying to use it is a bit painful, I wish there was a way to just type code…

On This Day...

  • 2012: Weekly review: Week ending December 14, 2012 — My sister and her husband welcomed the newest addition to the clan. My parents are over the moon – their [...]
  • 2011: Learning plans and time budgets: packing things into 2012 — Nudged by @catehstn‘s recommendation of my blog to @Tending2Entropy as an example of goal planning in personal life, I updated [...]
  • 2009: What can I help you learn? Looking for mentees — As awkward as “mentee” sounds (I feel like I’m looking for minty sweets), it’s the preferred word at IBM. Protégé [...]
  • 2007: That took more hacking than expected
  • 2007: Hello world
  • 2007: A good reason to check out the WordPress version of my blog — If you’re reading this from the Planner version of my blog, you might want to check out the WordPress version [...]
  • 2006: The Plan — Okay, here’s what I need to do. Tonight, I need to e-mail friends about my travel plans and any party plans. Saturday [...]
  • 2005: ARGH! I hate forms — So the application form for the Delta Kappa Gamma scholarship was a password-protected Microsoft Word document that included precise instructions to type [...]
  • 2005: Feedburner rocks — Feedburner just added interactivity to RSS feeds. People reading my RSS feed through Feedburner can now easily e-mail things or add them [...]
  • 2005: I’ve figured out why I’m here! =) — I love application essays. They make me think about what I’m doing with my life. Sure, I could probably just make [...]
  • 2004: Personal blog — Personal stuff will now be posted on http://www.livejournal.com/~sachachua/ . There be dragons. Here, however, will be lots of Emacs hackery and technical [...]
  • 2004: Kanji for the day — このセミナーは事前登録にて会費無料となっておりますのでお気軽にご参加ください。| This seminar’s registration is free of charge, so please join!
  • 2004: Oh, blast. MIT application incomplete. — They need a paper copy of my transcript. Also, recommendation letters from my teachers haven’t reached them yet. I’ve probably deep-sixed my [...]
  • 2003: Chess — Move W (M) B (S) 1 e4 e5 2 Nf3 Nc6 3 Nc3 Bb4 4 Nd5 Ba5 5 c3 Nf6 6 b4 Nxd5 7 exd5 e4 8 dxc6 exf3 9 bxa5 Qe7+ 10 Be2 fxe2 11 Qxe2 Qxe7+ 12 Kxe2 dxe6 13 Ba3 Be6 14 d4 b6 15 Bb4 Kd7 16 Rhb1 Bc4+ 17 Ke3 Rhe8+ 18 Kf4 Re2 19 Rd1 Rxf2 20 Kg3 Rxa2 21 Kf4 Rxg2 22 Ke5 Rxh2 23 d5 Re8+ 24 Kf4 c5 25 axb6 axb6 26 Kg3 Ree2 27 Kf3 Rd2 28 Ke4 Bxd5+ 29 Ke5 cxb4 30 cxb4 f6+ 31 Kf5 Be6+ 32 Ke4 |Kc6 33 Rab1 Rxd1 34 Rxd1 Rh4+ 35 Kd3 Rxb4 36 Rc1+ Kd6 37 Kc3 |Rc4+ 38 resign …
  • 2003: Chess with M. — Move W(M) B(S) 1 e4 e5 2 d4 exd4 3 Qxd4 Nc6 4 Qc4 Nf6 5 Bd3 d5 6 Qc3 dxe4 7 Bxe4 Bb4 8 Bd2 Bxc3 9 Nxc3 Nxe4 10 Nxe4 Nd4 11 o-o-o| Bf4 12 Re1 o-o 13 Nf3 Re8 14 Bd3 Re4 15 Nd4 Rxd4 16 Bxd4 Qxd4 17 Rd1 Qxf2 18 Rd2 Qxd2 to make the game interesting 19 Kxd2 g5 20 h4 g5 21 g3 h8 22 Rf1 Bg6 23 Ke3 Kf8 24 Rf4 c6 25 c4 Ke7 26 Rd4 Re8 27 Kf4 Rd8 28 Rxd8 Kxd8 29 Ke5 Kc7 30 b4 Kb6 31 c5 Kb5 32 a3 a5 33 Kd4 axb4 34 axb4 Kxb4 35 resign …
  • 2003: Group reviews — Watching the students help each other review gives me a warm and fuzzy feeling. I know they’ll probably think it’s a [...]
  • 2003: Kids’ software for Linux — http://www.lugod.org/presentations/kidslinux/ E-Mail from Martin WHEELER
  • 2003: “Transforming Non-Geeks Into Computer Whizzes” — Ellen Spertus, who runs an interdisciplinary computer science graduate program at Mills College in Oakland, Calif., is attempting to break myths about [...]
  • 2003: Contemplating trip — Mom brought up ideas for trip abroad. Find am looking forward to travelling the world and exchanging ideas. Am thinking of [...]
  • 2003: Rice — Parents very supportive of CookOrDie project. Suspect they find it funny as youngest daughter makes far-out attempts to become “independent girl” while [...]
  • 2003: Backlog: Potatoes, beef, bacon – real this time – and cheese – 2003.12.12 — - Microwave second pink potato for 5 minutes. - Cook half of second slice of bacon. (Still unable to figure out [...]
  • 2003: Backlog: Mashed potatoes, beef, and bacon bits – 2003.12.11 — Another quickie meal as had class in less than 30 minutes. - Grab large pink potatoes from supermarket, as convenience justifies [...]
  • 2003: Backlog: Beef, beans, and bacon in buns – 2003.12.10 — Whoops, hadn’t been writing. Have, however, faithfully adhered to constraints of CookOrDie. Last Wednesday, threw together quickie lunch of ground beef, pork [...]

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging