Compartilhar via


AppWidgetProvider.OnUpdate(Context, AppWidgetManager, Int32[]) Method

Definition

Called in response to the AppWidgetManager#ACTION_APPWIDGET_UPDATE and AppWidgetManager#ACTION_APPWIDGET_RESTORED broadcasts when this AppWidget provider is being asked to provide android.widget.RemoteViews RemoteViews for a set of AppWidgets.

[Android.Runtime.Register("onUpdate", "(Landroid/content/Context;Landroid/appwidget/AppWidgetManager;[I)V", "GetOnUpdate_Landroid_content_Context_Landroid_appwidget_AppWidgetManager_arrayIHandler")]
public virtual void OnUpdate (Android.Content.Context? context, Android.Appwidget.AppWidgetManager? appWidgetManager, int[]? appWidgetIds);
[<Android.Runtime.Register("onUpdate", "(Landroid/content/Context;Landroid/appwidget/AppWidgetManager;[I)V", "GetOnUpdate_Landroid_content_Context_Landroid_appwidget_AppWidgetManager_arrayIHandler")>]
abstract member OnUpdate : Android.Content.Context * Android.Appwidget.AppWidgetManager * int[] -> unit
override this.OnUpdate : Android.Content.Context * Android.Appwidget.AppWidgetManager * int[] -> unit

Parameters

context
Context

The android.content.Context Context in which this receiver is running.

appWidgetManager
AppWidgetManager

A AppWidgetManager object you can call AppWidgetManager#updateAppWidget on.

appWidgetIds
Int32[]

The appWidgetIds for which an update is needed. Note that this may be all of the AppWidget instances for this provider, or just a subset of them.

Attributes

Remarks

Called in response to the AppWidgetManager#ACTION_APPWIDGET_UPDATE and AppWidgetManager#ACTION_APPWIDGET_RESTORED broadcasts when this AppWidget provider is being asked to provide android.widget.RemoteViews RemoteViews for a set of AppWidgets. Override this method to implement your own AppWidget functionality.

{

Java documentation for android.appwidget.AppWidgetProvider.onUpdate(android.content.Context, android.appwidget.AppWidgetManager, int[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also