Posts Tagged ‘widgets’

Why I haven’t written TwitToday for Android

Thursday, February 25th, 2010

(or “looking at the limitations of the Android home screen widgets framework”)

Twitter client for Windows MobileA couple of years ago, I wrote a Windows Mobile app called TwitToday : a Twitter widget for the “Today screen” (the default screen when the phone is on, with all apps closed or minimised).

The rationale was that it was useful to have a way to post a tweet quickly when you don’t want to have to wait for a full-blown client to start.

Or if you don’t want to incur the battery or memory cost of leaving a client running all the time.


A widget that doesn't work on AndroidAndroid has a “Home screen”, which is similar to the Today screen on Windows Mobile. And it has support for widgets. This led several people to ask me why I never ported TwitToday to Android.

The short answer is that I did try, but the current state of the widgets framework made it impossible.

I tried to write a TwitToday widget back when the Android widgets framework was first introduced in Android 1.5.

It all started quite well:

  1. I wrote the Android Service that would carry out the background task of posting a tweet. No problems there – it worked fine.
  2. I wrote the widget XML to define the GUI. This is what you can see running in the screenshot. And it works… sort of. It has a text box that you can type up to 140 characters into. And if you press the button, it causes a chunk of code to get invoked.

The problem came when I tried to link the two together: to get the Service that posts tweets to obtain the String from the text box in my widget.

This isn’t possible. Android’s widget framework as it currently stands is geared around displaying information to the user, not collecting user input.

(more…)

Mobile Widgets – the new hotness?

Wednesday, October 21st, 2009

Over The Air was a month ago now, so this post has been sat in draft for way too long. But I thought it was still worth quickly sharing something noticeable from the event.

By way of quick background for those who aren’t familiar with it, it is an event for mobile developers – a couple of days filled with talks and presentations on all things mobile.

And this year, the big thing seemed to be widgets. There were a lot of talks on widgets. So many, in fact that you could choose a session in every time slot that was about widgets.

(more…)