Android.App.Admin.DevicePolicyManager.SetApplicationRestrictions Method
Called by a profile or device owner to set the application restrictions for a given target application running in the profile.

Syntax

[Android.Runtime.Register("setApplicationRestrictions", "(Landroid/content/ComponentName;Ljava/lang/String;Landroid/os/Bundle;)V", "GetSetApplicationRestrictions_Landroid_content_ComponentName_Ljava_lang_String_Landroid_os_Bundle_Handler")]
public virtual void SetApplicationRestrictions (Android.Content.ComponentName admin, string packageName, Android.OS.Bundle settings)

Parameters

admin
Which Android.App.Admin.DeviceAdminReceiver this request is associated with.
packageName
The name of the package to update restricted settings for.
settings
A Android.OS.Bundle to be parsed by the receiving application, conveying a new set of active restrictions.

Remarks

Called by a profile or device owner to set the application restrictions for a given target application running in the profile.

The provided Android.OS.Bundle consists of key-value pairs, where the types of values may be boolean, int, String, or String[].

The application restrictions are only made visible to the target application and the profile or device owner.

The calling device admin must be a profile or device owner; if it is not, a security exception will be thrown.

[Android Documentation]

Requirements

Namespace: Android.App.Admin
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8