Share via


JobParameters.StopReason Property

Definition

Returns the reason JobService#onStopJob(JobParameters) was called on this job.

public virtual int StopReason { [Android.Runtime.Register("getStopReason", "()I", "GetGetStopReasonHandler", ApiSince=31)] get; }
[<get: Android.Runtime.Register("getStopReason", "()I", "GetGetStopReasonHandler", ApiSince=31)>]
member this.StopReason : int

Property Value

The reason JobService#onStopJob(JobParameters) was called on this job. Will be #STOP_REASON_UNDEFINED if JobService#onStopJob(JobParameters) has not yet been called.

Attributes

Remarks

Returns the reason JobService#onStopJob(JobParameters) was called on this job.

Apps should not rely on the stop reason for critical decision-making, as additional stop reasons may be added in subsequent Android releases. The primary intended use of this method is for logging and diagnostic purposes to gain insights into the causes of job termination.

Java documentation for android.app.job.JobParameters.getStopReason().

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