Share via


AppWidgetManager.BindAppWidgetId(Int32, ComponentName) Method

Definition

Set the component for a given appWidgetId.

[Android.Runtime.Register("bindAppWidgetId", "(ILandroid/content/ComponentName;)V", "GetBindAppWidgetId_ILandroid_content_ComponentName_Handler")]
public virtual void BindAppWidgetId (int appWidgetId, Android.Content.ComponentName? provider);
[<Android.Runtime.Register("bindAppWidgetId", "(ILandroid/content/ComponentName;)V", "GetBindAppWidgetId_ILandroid_content_ComponentName_Handler")>]
abstract member BindAppWidgetId : int * Android.Content.ComponentName -> unit
override this.BindAppWidgetId : int * Android.Content.ComponentName -> unit

Parameters

appWidgetId
Int32

The AppWidget instance for which to set the RemoteViews.

provider
ComponentName

The android.content.BroadcastReceiver that will be the AppWidget provider for this AppWidget.

Attributes

Remarks

Set the component for a given appWidgetId.

<p class="note">You need the BIND_APPWIDGET permission or the user must have enabled binding widgets always for your component. This method is used by the AppWidget picker and should not be used by other apps.

Java documentation for android.appwidget.AppWidgetManager.bindAppWidgetId(int, android.content.ComponentName).

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