FileDocCategorySizeDatePackage
JobParameters.javaAPI DocAndroid 5.1 API3479Thu Mar 12 22:22:10 GMT 2015android.app.job

JobParameters

public class JobParameters extends Object implements android.os.Parcelable
Contains the parameters used to configure/identify your job. You do not create this object yourself, instead it is handed in to your application by the System.

Fields Summary
private final int
jobId
private final android.os.PersistableBundle
extras
private final android.os.IBinder
callback
private final boolean
overrideDeadlineExpired
public static final Creator
CREATOR
Constructors Summary
public JobParameters(android.os.IBinder callback, int jobId, android.os.PersistableBundle extras, boolean overrideDeadlineExpired)

hide

        this.jobId = jobId;
        this.extras = extras;
        this.callback = callback;
        this.overrideDeadlineExpired = overrideDeadlineExpired;
    
private JobParameters(android.os.Parcel in)

        jobId = in.readInt();
        extras = in.readPersistableBundle();
        callback = in.readStrongBinder();
        overrideDeadlineExpired = in.readInt() == 1;
    
Methods Summary
public intdescribeContents()

        return 0;
    
public android.app.job.IJobCallbackgetCallback()

hide

        return IJobCallback.Stub.asInterface(callback);
    
public android.os.PersistableBundlegetExtras()

return
The extras you passed in when constructing this job with {@link android.app.job.JobInfo.Builder#setExtras(android.os.PersistableBundle)}. This will never be null. If you did not set any extras this will be an empty bundle.

        return extras;
    
public intgetJobId()

return
The unique id of this job, specified at creation time.

        return jobId;
    
public booleanisOverrideDeadlineExpired()
For jobs with {@link android.app.job.JobInfo.Builder#setOverrideDeadline(long)} set, this provides an easy way to tell whether the job is being executed due to the deadline expiring. Note: If the job is running because its deadline expired, it implies that its constraints will not be met.

        return overrideDeadlineExpired;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeInt(jobId);
        dest.writePersistableBundle(extras);
        dest.writeStrongBinder(callback);
        dest.writeInt(overrideDeadlineExpired ? 1 : 0);