Android.Appwidget.AppWidgetProvider.OnEnabled Method
Called in response to the AppWidgetManager.ActionAppwidgetEnabled broadcast when the a AppWidget for this provider is instantiated.

Syntax

[Android.Runtime.Register("onEnabled", "(Landroid/content/Context;)V", "GetOnEnabled_Landroid_content_Context_Handler")]
public virtual void OnEnabled (Android.Content.Context context)

See Also

AppWidgetManager.ActionAppwidgetEnabled

Parameters

context
The Android.Content.Context in which this receiver is running.

Remarks

Called in response to the AppWidgetManager.ActionAppwidgetEnabled broadcast when the a AppWidget for this provider is instantiated. Override this method to implement your own AppWidget functionality.

When the last AppWidget for this provider is deleted, AppWidgetManager.ActionAppwidgetDisabled is sent by the AppWidget manager, and AppWidgetProvider.OnDisabled(Android.Content.Context) is called. If after that, an AppWidget for this provider is created again, onEnabled() will be called again.

[Android Documentation]

Requirements

Namespace: Android.Appwidget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 3