Udostępnij za pośrednictwem


JobInfo.Builder(Int32, ComponentName) Constructor

Definition

Initialize a new Builder to construct a JobInfo.

[Android.Runtime.Register(".ctor", "(ILandroid/content/ComponentName;)V", "")]
public Builder (int jobId, Android.Content.ComponentName jobService);
[<Android.Runtime.Register(".ctor", "(ILandroid/content/ComponentName;)V", "")>]
new Android.App.Job.JobInfo.Builder : int * Android.Content.ComponentName -> Android.App.Job.JobInfo.Builder

Parameters

jobId
Int32

Application-provided id for this job. Subsequent calls to cancel, or jobs created with the same jobId, will update the pre-existing job with the same id. This ID must be unique across all clients of the same uid (not just the same package). You will want to make sure this is a stable id across app updates, so probably not based on a resource ID.

jobService
ComponentName

The endpoint that you implement that will receive the callback from the JobScheduler.

Attributes

Remarks

Initialize a new Builder to construct a JobInfo.

Java documentation for android.app.job.JobInfo.Builder.JobInfo$Builder(int, android.content.ComponentName).

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