AppWidgetManager.BindAppWidgetIdIfAllowed Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
BindAppWidgetIdIfAllowed(Int32, UserHandle, ComponentName, Bundle) |
Set the provider for a given appWidgetId if the caller has a permission. |
BindAppWidgetIdIfAllowed(Int32, ComponentName, Bundle) |
Set the component for a given appWidgetId. |
BindAppWidgetIdIfAllowed(Int32, ComponentName) |
Set the component for a given appWidgetId. |
BindAppWidgetIdIfAllowed(Int32, UserHandle, ComponentName, Bundle)
Set the provider for a given appWidgetId if the caller has a permission.
[Android.Runtime.Register("bindAppWidgetIdIfAllowed", "(ILandroid/os/UserHandle;Landroid/content/ComponentName;Landroid/os/Bundle;)Z", "GetBindAppWidgetIdIfAllowed_ILandroid_os_UserHandle_Landroid_content_ComponentName_Landroid_os_Bundle_Handler")]
public virtual bool BindAppWidgetIdIfAllowed (int appWidgetId, Android.OS.UserHandle? user, Android.Content.ComponentName? provider, Android.OS.Bundle? options);
[<Android.Runtime.Register("bindAppWidgetIdIfAllowed", "(ILandroid/os/UserHandle;Landroid/content/ComponentName;Landroid/os/Bundle;)Z", "GetBindAppWidgetIdIfAllowed_ILandroid_os_UserHandle_Landroid_content_ComponentName_Landroid_os_Bundle_Handler")>]
abstract member BindAppWidgetIdIfAllowed : int * Android.OS.UserHandle * Android.Content.ComponentName * Android.OS.Bundle -> bool
override this.BindAppWidgetIdIfAllowed : int * Android.OS.UserHandle * Android.Content.ComponentName * Android.OS.Bundle -> bool
Parameters
- appWidgetId
- Int32
The AppWidget id under which to bind the provider.
- user
- UserHandle
The user id in which the provider resides.
- provider
- ComponentName
The component name of the provider.
- options
- Bundle
An optional Bundle containing options for the AppWidget.
Returns
true if this component has permission to bind the AppWidget
- Attributes
Remarks
Set the provider for a given appWidgetId if the caller has a permission.
If successful, the app widget provider will receive a #ACTION_APPWIDGET_UPDATE
broadcast.
<strong>Note:</strong> You need the android.Manifest.permission#BIND_APPWIDGET
permission or the user must have enabled binding widgets always for your component. Should be used by apps that host widgets. If this method returns false, call #ACTION_APPWIDGET_BIND
to request permission to bind.
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
BindAppWidgetIdIfAllowed(Int32, ComponentName, Bundle)
Set the component for a given appWidgetId.
[Android.Runtime.Register("bindAppWidgetIdIfAllowed", "(ILandroid/content/ComponentName;Landroid/os/Bundle;)Z", "GetBindAppWidgetIdIfAllowed_ILandroid_content_ComponentName_Landroid_os_Bundle_Handler")]
public virtual bool BindAppWidgetIdIfAllowed (int appWidgetId, Android.Content.ComponentName? provider, Android.OS.Bundle? options);
[<Android.Runtime.Register("bindAppWidgetIdIfAllowed", "(ILandroid/content/ComponentName;Landroid/os/Bundle;)Z", "GetBindAppWidgetIdIfAllowed_ILandroid_content_ComponentName_Landroid_os_Bundle_Handler")>]
abstract member BindAppWidgetIdIfAllowed : int * Android.Content.ComponentName * Android.OS.Bundle -> bool
override this.BindAppWidgetIdIfAllowed : int * Android.Content.ComponentName * Android.OS.Bundle -> bool
Parameters
- appWidgetId
- Int32
The AppWidget id under which to bind the provider.
- provider
- ComponentName
The android.content.BroadcastReceiver
that will be the AppWidget
provider for this AppWidget.
- options
- Bundle
Bundle containing options for the AppWidget. See also
#updateAppWidgetOptions(int, Bundle)
Returns
true if this component has permission to bind the AppWidget
- Attributes
Remarks
Set the component for a given appWidgetId.
If successful, the app widget provider will receive a #ACTION_APPWIDGET_UPDATE
broadcast.
<p class="note">You need the BIND_APPWIDGET permission or the user must have enabled binding widgets always for your component. Should be used by apps that host widgets; if this method returns false, call #ACTION_APPWIDGET_BIND
to request permission to bind
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
BindAppWidgetIdIfAllowed(Int32, ComponentName)
Set the component for a given appWidgetId.
[Android.Runtime.Register("bindAppWidgetIdIfAllowed", "(ILandroid/content/ComponentName;)Z", "GetBindAppWidgetIdIfAllowed_ILandroid_content_ComponentName_Handler")]
public virtual bool BindAppWidgetIdIfAllowed (int appWidgetId, Android.Content.ComponentName? provider);
[<Android.Runtime.Register("bindAppWidgetIdIfAllowed", "(ILandroid/content/ComponentName;)Z", "GetBindAppWidgetIdIfAllowed_ILandroid_content_ComponentName_Handler")>]
abstract member BindAppWidgetIdIfAllowed : int * Android.Content.ComponentName -> bool
override this.BindAppWidgetIdIfAllowed : int * Android.Content.ComponentName -> bool
Parameters
- appWidgetId
- Int32
The AppWidget id under which to bind the provider.
- provider
- ComponentName
The android.content.BroadcastReceiver
that will be the AppWidget
provider for this AppWidget.
Returns
true if this component has permission to bind the AppWidget
- Attributes
Remarks
Set the component for a given appWidgetId.
If successful, the app widget provider will receive a #ACTION_APPWIDGET_UPDATE
broadcast.
<p class="note">You need the BIND_APPWIDGET permission or the user must have enabled binding widgets always for your component. Should be used by apps that host widgets; if this method returns false, call #ACTION_APPWIDGET_BIND
to request permission to bind
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.