Android.App.Admin.DevicePolicyManager.SetMaximumTimeToLock Method
Called by an application that is administering the device to set the maximum time for user activity until the device will lock.

Syntax

[Android.Runtime.Register("setMaximumTimeToLock", "(Landroid/content/ComponentName;J)V", "GetSetMaximumTimeToLock_Landroid_content_ComponentName_JHandler")]
public virtual void SetMaximumTimeToLock (Android.Content.ComponentName admin, long timeMs)

Parameters

admin
Which Android.App.Admin.DeviceAdminReceiver this request is associated with.
timeMs
The new desired maximum time to lock in milliseconds. A value of 0 means there is no restriction.

Remarks

Called by an application that is administering the device to set the maximum time for user activity until the device will lock. This limits the length that the user can set. It takes effect immediately.

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