onUpdate

open fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: Array<Int>)

Called in response to the ACTION_APPWIDGET_UPDATE broadcast when this AppWidget provider is being asked to provide RemoteViews for a set of AppWidgets. Override this method to implement your own AppWidget functionality.

Parameters

context

The Context in which this receiver is running.

appWidgetManager

A android.appwidget.AppWidgetManager object you can call updateAppWidget on.

appWidgetIds

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.

See also

android.appwidget.AppWidgetManager#ACTION_APPWIDGET_UPDATE