Language

JobInfo.Builder.SetMinimumLatency(Int64) Method

Definition

Set the minimum delay before the job is eligible to run.

[Android.Runtime.Register("setMinimumLatency", "(J)Landroid/app/job/JobInfo$Builder;", "")]
public Android.App.Job.JobInfo.Builder? SetMinimumLatency(long minLatencyMillis);
[<Android.Runtime.Register("setMinimumLatency", "(J)Landroid/app/job/JobInfo$Builder;", "")>]
member this.SetMinimumLatency : int64 -> Android.App.Job.JobInfo.Builder

Parameters

minLatencyMillis
Int64

The minimum delay in milliseconds, unless an override deadline expires first.

Returns

This builder instance.

Attributes

Remarks

The job normally cannot run before the delay has elapsed and may run later. An expired SetOverrideDeadline(Int64) can allow it to run before the delay has elapsed.

A periodic job with a nonzero minimum latency causes Build() to throw an exception. On Android 15 and later, for apps targeting Android 15 or later, a negative latency also causes Build() to throw an exception.

Android reference for android.app.job.JobInfo.Builder.setMinimumLatency.

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