DevicePolicyManager.SetPolicy 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.
Sets the given policy.
[Android.Runtime.Register("setPolicy", "(Landroid/app/admin/PolicyIdentifier;ILjava/lang/Object;)V", "GetSetPolicy_Landroid_app_admin_PolicyIdentifier_ILjava_lang_Object_Handler", ApiSince=37)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public virtual void SetPolicy(Android.App.Admin.PolicyIdentifier id, Android.App.Admin.DevicePolicyManagerScope scope, Java.Lang.Object? value);
[<Android.Runtime.Register("setPolicy", "(Landroid/app/admin/PolicyIdentifier;ILjava/lang/Object;)V", "GetSetPolicy_Landroid_app_admin_PolicyIdentifier_ILjava_lang_Object_Handler", ApiSince=37)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member SetPolicy : Android.App.Admin.PolicyIdentifier * Android.App.Admin.DevicePolicyManagerScope * Java.Lang.Object -> unit
override this.SetPolicy : Android.App.Admin.PolicyIdentifier * Android.App.Admin.DevicePolicyManagerScope * Java.Lang.Object -> unit
Parameters
The identifier of the policy to set. See android.app.admin.policies for
available policy identifiers.
- scope
- DevicePolicyManagerScope
The scope the policy will apply to.
- value
- Object
The value of the policy. If value is set to null, the policy is cleared. Check the documentation of individual identifiers for more details.
- Attributes