• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<body>
2<p>Android allows applications to publish views to be embedded in other applications.  These
3views are called widgets, and are published by "AppWidget providers."  The component that can
4contain widgets is called a "AppWidget host."
5</p>
6<p>For more information, see the
7<a href="{@docRoot}guide/topics/appwidgets/index.html">AppWidgets</a>
8documentation in the Dev Guide.</p>
9
10
11{@more}
12
13
14<h2><a name="providers"></a>AppWidget Providers</h2>
15<p>Any application can publish widgets.  All an application needs to do to publish a widget is
16to have a {@link android.content.BroadcastReceiver} that receives the {@link
17android.appwidget.AppWidgetManager#ACTION_APPWIDGET_UPDATE AppWidgetManager.ACTION_APPWIDGET_UPDATE} intent,
18and provide some meta-data about the widget.  Android provides the
19{@link android.appwidget.AppWidgetProvider} class, which extends BroadcastReceiver, as a convenience
20class to aid in handling the broadcasts.
21
22
23<h2>AppWidget Hosts</h3>
24<p>Widget hosts are the containers in which widgets can be placed.  Most of the look and feel
25details are left up to the widget hosts.  For example, the home screen has one way of viewing
26widgets, but the lock screen could also contain widgets, and it would have a different way of
27adding, removing and otherwise managing widgets.</p>
28<p>For more information on implementing your own widget host, see the
29{@link android.appwidget.AppWidgetHost AppWidgetHost} class.</p>
30
31</body>
32
33