Android.Appwidget.AppWidgetManager.ActionAppwidgetBind Field
Activity action to launch from your Android.Appwidget.AppWidgetHost activity when you want to bind an AppWidget to display and bindAppWidgetIdIfAllowed returns false.

Syntax

[Android.Runtime.Register("ACTION_APPWIDGET_BIND")]
public const string ActionAppwidgetBind

See Also

AppWidgetManager.ActionAppwidgetConfigure

Remarks

Activity action to launch from your Android.Appwidget.AppWidgetHost activity when you want to bind an AppWidget to display and bindAppWidgetIdIfAllowed returns false.

You must supply the following extras:
AppWidgetManager.ExtraAppwidgetIdA newly allocated appWidgetId, which will be bound to the AppWidget provider you provide.
AppWidgetManager.ExtraAppwidgetProviderThe BroadcastReceiver that will be the AppWidget provider for this AppWidget.
AppWidgetManager.ExtraAppwidgetProviderProfileAn optional handle to a user profile under which runs the provider for this AppWidget.

The system will respond with an onActivityResult call with the following extras in the intent:
AppWidgetManager.ExtraAppwidgetIdThe appWidgetId that you supplied in the original intent.

When you receive the result from the AppWidget bind activity, if the resultCode is Android.App.Activity.RESULT_OK, the AppWidget has been bound. You should then check the AppWidgetProviderInfo for the returned AppWidget, and if it has one, launch its configuration activity. If Android.App.Activity.RESULT_CANCELED is returned, you should delete the appWidgetId.

[Android Documentation]

Requirements

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