DevicePolicyManager.SetCrossProfileWidgetProviders 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.
Called by the profile owner of a managed profile or a holder of the permission
android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILE_INTERACTION to enable
widget providers from packages to be available in the parent profile.
[Android.Runtime.Register("setCrossProfileWidgetProviders", "(Ljava/util/Set;)V", "GetSetCrossProfileWidgetProviders_Ljava_util_Set_Handler", ApiSince=37)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_PROFILE_INTERACTION")]
public virtual void SetCrossProfileWidgetProviders(System.Collections.Generic.ICollection<string> packageNames);
[<Android.Runtime.Register("setCrossProfileWidgetProviders", "(Ljava/util/Set;)V", "GetSetCrossProfileWidgetProviders_Ljava_util_Set_Handler", ApiSince=37)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_PROFILE_INTERACTION")>]
abstract member SetCrossProfileWidgetProviders : System.Collections.Generic.ICollection<string> -> unit
override this.SetCrossProfileWidgetProviders : System.Collections.Generic.ICollection<string> -> unit
Parameters
- packageNames
- ICollection<String>
The packages from which widget providers are allowlisted.
- Attributes
Remarks
Called by the profile owner of a managed profile or a holder of the permission Manifest.permission.MANAGE_DEVICE_POLICY_PROFILE_INTERACTION to enable widget providers from packages to be available in the parent profile. As a result the user will be able to add widgets from the allowlisted package running under the profile to a widget host which runs under the parent profile, for example the home screen. Note that a package may have zero or more provider components, where each component provides a different widget type.
Note: By default no widget provider package is allowlisted.
Note: This API updates the entire allowlist in one-go, overriding any previous allowlist. This is more efficient than using addCrossProfileWidgetProvider(ComponentName, String) and removeCrossProfileWidgetProvider(ComponentName, String) to update the allowlist one package a time, especially if the allowlist consists of many packages.
Android reference for android.app.admin.DevicePolicyManager.setCrossProfileWidgetProviders.
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.