Chapter 8: Home Screen App Widgets

App widgets are small apps that can run inside another app, called the widget host. Although developers can create widget host apps, the most common use for app widgets is on the home screen.

App widgets on home screens have become one of the key differentiating features of the Android platform, separating it from the other mobile operating systems. App widgets make Android home screens more than just a collection of app icons.

This chapter explains how to make useful and scalable home screen app widgets. It doesn’t cover other types of widget hosts, as they are very rarely used.

Uses of Home Screen App Widgets

A typical app widget is usually an extension to an app that provides users with more direct access to the app functionality or information. Users don’t have to start the application to interact with the app widgets. These types of widgets are called companion widgets. Another type of widgets is the app whose main functionality is the widget itself. These could be, as examples, clocks and settings toggles.

Weather widgets are currently the most popular type of widget. The best example of such a widget is Beautiful Widgets by LevelUp Studio (see Figure 8-1). It also was the first paid app on Android that reached one million downloads. That happened in December of 2011.

Device manufacturers use app widgets heavily on their marketing and branding. The HTC sense clock is an iconic mark of their brand and makes HTC sense user interface instantly ...

Get Smashing Android UI now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.