The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 1 | <body> |
Scott Main | f4f05b8 | 2011-01-07 14:38:23 -0800 | [diff] [blame] | 2 | <p>Contains the components necessary to create "app widgets", which users can embed in other |
| 3 | applications (such as the home screen) to quickly access application data and services without |
| 4 | launching a new activity.</p> |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 5 | |
Joe Fernandez | 3aef8e1d | 2011-12-20 10:38:34 -0800 | [diff] [blame] | 6 | <p>For more information, see the |
| 7 | <a href="{@docRoot}guide/topics/appwidgets/index.html">App Widgets</a> developer guide.</p> |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 8 | {@more} |
Joe Fernandez | 3aef8e1d | 2011-12-20 10:38:34 -0800 | [diff] [blame] | 9 | |
Scott Main | f4f05b8 | 2011-01-07 14:38:23 -0800 | [diff] [blame] | 10 | <p>The behavior of an app widget is published by an "app widget provider." An "app widget host" is |
| 11 | a component that can contain app widgets (such as the Home screen).</p> |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 12 | |
Scott Main | f4f05b8 | 2011-01-07 14:38:23 -0800 | [diff] [blame] | 13 | <p>Any application can publish app widgets (as an app widget provider). All an application needs to |
| 14 | do to publish an app widget is |
| 15 | provide a {@link android.content.BroadcastReceiver} that receives the {@link |
| 16 | android.appwidget.AppWidgetManager#ACTION_APPWIDGET_UPDATE} intent |
| 17 | and provide some metadata about the app widget. Android provides the |
| 18 | {@link android.appwidget.AppWidgetProvider} class, which extends {@link |
| 19 | android.content.BroadcastReceiver}, as a convenience class to define the app widget behavrio and aid |
| 20 | in handling the broadcasts.</p> |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 21 | |
Scott Main | f4f05b8 | 2011-01-07 14:38:23 -0800 | [diff] [blame] | 22 | <p>App widget hosts are the containers in which widgets can be placed. Most of the look and feel |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 23 | details are left up to the widget hosts. For example, the home screen has one way of viewing |
| 24 | widgets, but the lock screen could also contain widgets, and it would have a different way of |
| 25 | adding, removing and otherwise managing widgets.</p> |
Scott Main | f4f05b8 | 2011-01-07 14:38:23 -0800 | [diff] [blame] | 26 | |
Joe Fernandez | 3aef8e1d | 2011-12-20 10:38:34 -0800 | [diff] [blame] | 27 | <p>For information about implementing an app widget host, see the {@link |
| 28 | android.appwidget.AppWidgetHost} class.</p> |
Scott Main | 620986a | 2009-04-22 18:58:13 -0700 | [diff] [blame] | 29 | |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 30 | </body> |
| 31 | |