DevicePolicyManager.SetManagedProfileMaximumTimeOff 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.
Called by a profile owner of an organization-owned managed profile to set maximum time the profile is allowed to be turned off.
[Android.Runtime.Register("setManagedProfileMaximumTimeOff", "(Landroid/content/ComponentName;J)V", "GetSetManagedProfileMaximumTimeOff_Landroid_content_ComponentName_JHandler", ApiSince=30)]
public virtual void SetManagedProfileMaximumTimeOff (Android.Content.ComponentName admin, long timeoutMillis);
[<Android.Runtime.Register("setManagedProfileMaximumTimeOff", "(Landroid/content/ComponentName;J)V", "GetSetManagedProfileMaximumTimeOff_Landroid_content_ComponentName_JHandler", ApiSince=30)>]
abstract member SetManagedProfileMaximumTimeOff : Android.Content.ComponentName * int64 -> unit
override this.SetManagedProfileMaximumTimeOff : Android.Content.ComponentName * int64 -> unit
Parameters
- admin
- ComponentName
Which DeviceAdminReceiver
this request is associated with
- timeoutMillis
- Int64
Maximum time the profile is allowed to be off in milliseconds or 0 if not limited. The minimum non-zero value corresponds to 72 hours. If an admin sets a smaller non-zero vaulue, 72 hours will be set instead.
- Attributes
Remarks
Called by a profile owner of an organization-owned managed profile to set maximum time the profile is allowed to be turned off. If the profile is turned off for longer, personal apps are suspended on the device.
When personal apps are suspended, an ongoing notification about that is shown to the user. When the user taps the notification, system invokes #ACTION_CHECK_POLICY_COMPLIANCE
in the profile owner package. Profile owner implementation that uses personal apps suspension must handle this intent.
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.