blob: d4c0db04b4a74aa6d5452e3de15c0952582fbfcf [file] [log] [blame]
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07001<body>
Scott Mainf4f05b82011-01-07 14:38:23 -08002<p>Contains the components necessary to create "app widgets", which users can embed in other
3applications (such as the home screen) to quickly access application data and services without
4launching a new activity.</p>
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07005
Joe Fernandez3aef8e1d2011-12-20 10:38:34 -08006<p>For more information, see the
Scott Main9be01052012-06-22 12:35:08 -07007<a href="{@docRoot}guide/topics/appwidgets/index.html">App Widgets</a> guide.</p>
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07008{@more}
Joe Fernandez3aef8e1d2011-12-20 10:38:34 -08009
Scott Mainf4f05b82011-01-07 14:38:23 -080010<p>The behavior of an app widget is published by an "app widget provider." An "app widget host" is
11a component that can contain app widgets (such as the Home screen).</p>
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -070012
Scott Mainf4f05b82011-01-07 14:38:23 -080013<p>Any application can publish app widgets (as an app widget provider). All an application needs to
14do to publish an app widget is
15provide a {@link android.content.BroadcastReceiver} that receives the {@link
16android.appwidget.AppWidgetManager#ACTION_APPWIDGET_UPDATE} intent
17and provide some metadata about the app widget. Android provides the
18{@link android.appwidget.AppWidgetProvider} class, which extends {@link
19android.content.BroadcastReceiver}, as a convenience class to define the app widget behavrio and aid
20in handling the broadcasts.</p>
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -070021
Scott Mainf4f05b82011-01-07 14:38:23 -080022<p>App widget hosts are the containers in which widgets can be placed. Most of the look and feel
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -070023details are left up to the widget hosts. For example, the home screen has one way of viewing
24widgets, but the lock screen could also contain widgets, and it would have a different way of
25adding, removing and otherwise managing widgets.</p>
Scott Mainf4f05b82011-01-07 14:38:23 -080026
Joe Fernandez3aef8e1d2011-12-20 10:38:34 -080027<p>For information about implementing an app widget host, see the {@link
28android.appwidget.AppWidgetHost} class.</p>
Scott Main620986a2009-04-22 18:58:13 -070029
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -070030</body>
31