Since: API Level 3


Classes | Description

Android allows applications to publish views to be embedded in other applications. These views are called widgets, and are published by "AppWidget providers." The component that can contain widgets is called a "AppWidget host."

For more information, see the AppWidgets documentation in the Dev Guide.

AppWidget Providers

Any application can publish widgets. All an application needs to do to publish a widget is to have a BroadcastReceiver that receives the AppWidgetManager.ACTION_APPWIDGET_UPDATE intent, and provide some meta-data about the widget. Android provides the AppWidgetProvider class, which extends BroadcastReceiver, as a convenience class to aid in handling the broadcasts.

AppWidget Hosts

Widget hosts are the containers in which widgets can be placed. Most of the look and feel details are left up to the widget hosts. For example, the home screen has one way of viewing widgets, but the lock screen could also contain widgets, and it would have a different way of adding, removing and otherwise managing widgets.

For more information on implementing your own widget host, see the AppWidgetHost class.