In Chapter 25, we covered the existing set of classes in the SDK that support home screen widgets. The primary ones are
RemoteViews, and an activity that can be used to configure an
AppWidgetProvider with initialization parameters.
Briefly, here is the core idea of how home screen widgets work (knowing this should make the rest of this section a bit easier to follow). An
AppWidgetProvider is a broadcast receiver that gets invoked every once in a while based on a timer interval that you specify in a configuration file. This
AppWidgetProvider then loads a
RemoteViews instance based on a layout file. This
RemoteViews object is then passed to the
AppWidgetManager to be displayed ...