Share via


DevicePolicyManager.AcknowledgeDeviceCompliant Method

Definition

Called by a profile owner of an organization-owned managed profile to acknowledge that the device is compliant and the user can turn the profile off if needed according to the maximum time off policy.

[Android.Runtime.Register("acknowledgeDeviceCompliant", "()V", "GetAcknowledgeDeviceCompliantHandler", ApiSince=31)]
public virtual void AcknowledgeDeviceCompliant ();
[<Android.Runtime.Register("acknowledgeDeviceCompliant", "()V", "GetAcknowledgeDeviceCompliantHandler", ApiSince=31)>]
abstract member AcknowledgeDeviceCompliant : unit -> unit
override this.AcknowledgeDeviceCompliant : unit -> unit
Attributes

Remarks

Called by a profile owner of an organization-owned managed profile to acknowledge that the device is compliant and the user can turn the profile off if needed according to the maximum time off policy.

This method should be called when the device is deemed compliant after getting DeviceAdminReceiver#onComplianceAcknowledgementRequired(Context, Intent) callback in case it is overridden. Before this method is called the user is still free to turn the profile off, but the timer won't be reset, so personal apps will be suspended sooner.

DPCs only need acknowledging device compliance if they override DeviceAdminReceiver#onComplianceAcknowledgementRequired(Context, Intent), otherwise compliance is acknowledged automatically.

Java documentation for android.app.admin.DevicePolicyManager.acknowledgeDeviceCompliant().

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