DevicePolicyManager.SetTime(ComponentName, Int64) 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 device owner or a profile owner of an organization-owned managed profile to set the system wall clock time.
[Android.Runtime.Register("setTime", "(Landroid/content/ComponentName;J)Z", "GetSetTime_Landroid_content_ComponentName_JHandler", ApiSince=28)]
[Android.Runtime.RequiresPermission("android.permission.SET_TIME")]
public virtual bool SetTime(Android.Content.ComponentName? admin, long millis);[<Android.Runtime.Register("setTime", "(Landroid/content/ComponentName;J)Z", "GetSetTime_Landroid_content_ComponentName_JHandler", ApiSince=28)>]
[<Android.Runtime.RequiresPermission("android.permission.SET_TIME")>]
abstract member SetTime : Android.Content.ComponentName * int64 -> bool
override this.SetTime : Android.Content.ComponentName * int64 -> boolParameters
- admin
- ComponentName
Which DeviceAdminReceiver this request is associated with. Null if the
caller is not a device admin.
- millis
- Int64
time in milliseconds since the Epoch
Returns
true if set time succeeded, false otherwise.
- Attributes
Remarks
Called by a device owner or a profile owner of an organization-owned managed profile to set the system wall clock time. This only takes effect if called when android.provider.Settings.Global#AUTO_TIME is 0, otherwise false will be returned.
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.