Added in API level 36

PendingJobReasonsInfo


class PendingJobReasonsInfo : Parcelable
kotlin.Any
   ↳ android.app.job.PendingJobReasonsInfo

A simple wrapper which includes a timestamp (in millis since epoch) and an array of android.app.job.JobScheduler.PendingJobReason at that timestamp for why a particular job may be pending.

Summary

Inherited constants
Public constructors
PendingJobReasonsInfo(timestampMillis: Long, reasons: IntArray)

Public methods
Int

IntArray

Returns a set of android.

Long


Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<PendingJobReasonsInfo!>

Public constructors

Public methods

describeContents

Added in API level 36
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getPendingJobReasons

Added in API level 36
fun getPendingJobReasons(): IntArray

Returns a set of android.app.job.JobScheduler.PendingJobReason representing why the job may not have executed at the associated timestamp.

These reasons could either be explicitly set constraints on the job or implicit constraints imposed by the system due to various reasons.

Note: if the only android.app.job.JobScheduler.PendingJobReason present is android.app.job.JobScheduler.PendingJobReason#PENDING_JOB_REASON_UNDEFINED, it could mean that the job was ready to be executed at that time.

Return
IntArray This value cannot be null. Value is android.app.job.JobScheduler#PENDING_JOB_REASON_UNDEFINED, android.app.job.JobScheduler#PENDING_JOB_REASON_APP, android.app.job.JobScheduler#PENDING_JOB_REASON_APP_STANDBY, android.app.job.JobScheduler#PENDING_JOB_REASON_BACKGROUND_RESTRICTION, android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_BATTERY_NOT_LOW, android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_CHARGING, android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_CONNECTIVITY, android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_CONTENT_TRIGGER, android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_DEVICE_IDLE, android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_MINIMUM_LATENCY, android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_PREFETCH, android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_STORAGE_NOT_LOW, android.app.job.JobScheduler#PENDING_JOB_REASON_DEVICE_STATE, android.app.job.JobScheduler#PENDING_JOB_REASON_EXECUTING, android.app.job.JobScheduler#PENDING_JOB_REASON_INVALID_JOB_ID, android.app.job.JobScheduler#PENDING_JOB_REASON_JOB_SCHEDULER_OPTIMIZATION, android.app.job.JobScheduler#PENDING_JOB_REASON_QUOTA, android.app.job.JobScheduler#PENDING_JOB_REASON_USER, or android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_DEADLINE

getTimestampMillis

Added in API level 36
fun getTimestampMillis(): Long


Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z.

Return
Long the time (in millis since epoch) associated with the set of pending job reasons. Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z.

writeToParcel

Added in API level 36
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 36
static val CREATOR: Parcelable.Creator<PendingJobReasonsInfo!>