java.lang.Object | |
↳ | android.appwidget.AppWidgetHost |
AppWidgetHost provides the interaction with the AppWidget service for apps, like the home screen, that want to embed AppWidgets in their UI.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get a appWidgetId for a host in the calling process.
| |||||||||||
Create the AppWidgetHostView for the given widget.
| |||||||||||
Remove all records about all hosts for your package.
| |||||||||||
Stop listening to changes for this AppWidget.
| |||||||||||
Remove all records about this host from the AppWidget manager.
| |||||||||||
Starts an app widget provider configure activity for result on behalf of the caller.
| |||||||||||
Start receiving onAppWidgetChanged calls for your AppWidgets.
| |||||||||||
Stop receiving onAppWidgetChanged calls for your AppWidgets.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clear the list of Views that have been created by this AppWidgetHost.
| |||||||||||
Called to create the AppWidgetHostView. Override to return a custom subclass if you
need it.
| |||||||||||
Called when the AppWidget provider for a AppWidget has been upgraded to a new apk.
| |||||||||||
Called when the set of available widgets changes (ie.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Get a appWidgetId for a host in the calling process.
Create the AppWidgetHostView for the given widget. The AppWidgetHost retains a pointer to the newly-created View.
Remove all records about all hosts for your package.
Stop listening to changes for this AppWidget.
Remove all records about this host from the AppWidget manager.
Starts an app widget provider configure activity for result on behalf of the caller.
Use this method if the provider is in another profile as you are not allowed to start
an activity in another profile. You can optionally provide a request code that is
returned in onActivityResult(int, int, android.content.Intent)
and
an options bundle to be passed to the started activity.
Note that the provided app widget has to be bound for this method to work.
activity | The activity from which to start the configure one. |
---|---|
appWidgetId | The bound app widget whose provider's config activity to start. |
intentFlags | Optional intent flags. |
requestCode | Optional request code retuned with the result. |
ActivityNotFoundException | If the activity is not found. |
---|
Start receiving onAppWidgetChanged calls for your AppWidgets. Call this when your activity becomes visible, i.e. from onStart() in your Activity.
Stop receiving onAppWidgetChanged calls for your AppWidgets. Call this when your activity is no longer visible, i.e. from onStop() in your Activity.
Clear the list of Views that have been created by this AppWidgetHost.
Called to create the AppWidgetHostView. Override to return a custom subclass if you need it.
Called when the AppWidget provider for a AppWidget has been upgraded to a new apk.
Called when the set of available widgets changes (ie. widget containing packages are added, updated or removed, or widget components are enabled or disabled.)