Tuesday, 26 April 2011

Using Android widgets

When implemented correctly Android widgets can be very useful to users. Widgets should provide one or more of the following functionalities:
  • Deep link to application functionality.
  • Display relevant and current information to users without them having to open the application.
  • Provide direct controls to app or phone properties.
Widgets should not be just glorified app launcher icons!

Deep linking to app functionality

Google Buzz widget and Evernote's widget are great examples of deep linking into app functionality and hence providing users fast access to the most used features.



Display relevant info

Google reader, weather and öffi stations widgets are good examples of widgets that show current information. Note that widgets cannot automatically update their data more often than every 30 minutes. In many cases that is enough but sometimes more current information is required.

In case of Google reader or weather widget tapping the widget will open corresponding view in the application ie. tapping a Google reader item will open the news item. In the Öffi stations that isn't the case however. The widget displays next public transportation departures from the nearest station. The data needs to be much more current than half hour. The developer has solved the refreshing interval issue by making user tap to refresh the data.





Twitter, Facebook both combine a functionality deep link (post a new status message) with displaying items on user's feed. Foursquare on the other hand separates functional and information widget into two separate widgets.

Note also how all of these widgets have similar left and right arrow for cycling though pages of updates. This seems to be very well established pattern.




Provide system toggles

Flashlight app's widget is extremely simple but one of the most useful widgets I have on my phone. Tapping it turns on the phone's camera flash.

Android's default power control widget is another simple widget that provides direct control to system property toggles like wifi and bluetooth.





3rd party launchers & extended widget APIs

SPB 3D Shell implements their own widgets s part of the home screen replacement. These widgets are seamlessly integrated  and don't have the same limits than normal Android widgets. SPB doesn't have an open API for 3rd party developers yet though.

Some other home screen replacements have APIs for developers. Widgets build against these APIs won't be usable by most of Android users as they require installation of the corresponding home screen replacement first.