Android.App.Admin.DevicePolicyManager.LockNow Method
Make the device lock immediately, as if the lock screen timeout has expired at the point of this call.

Syntax

[Android.Runtime.Register("lockNow", "()V", "GetLockNowHandler")]
public virtual void LockNow ()

Remarks

Make the device lock immediately, as if the lock screen timeout has expired at the point of this call.

The calling device admin must have requested DeviceAdminInfo.UsesPolicyForceLock to be able to call this method; if it has 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