public
class
JobParameters
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.app.job.JobParameters |
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.
Inherited constants |
---|
From
interface
android.os.Parcelable
|
Fields | |
---|---|
public
static
final
Creator<JobParameters> |
CREATOR
|
Public methods | |
---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
PersistableBundle
|
getExtras()
|
int
|
getJobId()
|
String[]
|
getTriggeredContentAuthorities()
For jobs with |
Uri[]
|
getTriggeredContentUris()
For jobs with |
boolean
|
isOverrideDeadlineExpired()
For jobs with |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
---|---|
From
class
java.lang.Object
| |
From
interface
android.os.Parcelable
|
int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(Parcel, int)
,
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR
bit.
Returns | |
---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
PersistableBundle getExtras ()
Returns | |
---|---|
PersistableBundle |
The extras you passed in when constructing this job with
setExtras(android.os.PersistableBundle) . This will
never be null. If you did not set any extras this will be an empty bundle.
|
int getJobId ()
Returns | |
---|---|
int |
The unique id of this job, specified at creation time. |
String[] getTriggeredContentAuthorities ()
For jobs with addTriggerContentUri(JobInfo.TriggerContentUri)
set, this
reports which content authorities have triggered the job. It will only be null if no
authorities have triggered it -- that is, the job executed for some other reason, such
as a deadline expiring. If this is non-null, you can use getTriggeredContentUris()
to retrieve the details of which URIs changed (as long as that has not exceeded the maximum
number it can reported).
Returns | |
---|---|
String[] |
Uri[] getTriggeredContentUris ()
For jobs with addTriggerContentUri(JobInfo.TriggerContentUri)
set, this
reports which URIs have triggered the job. This will be null if either no URIs have
triggered it (it went off due to a deadline or other reason), or the number of changed
URIs is too large to report. Whether or not the number of URIs is too large, you can
always use getTriggeredContentAuthorities()
to determine whether the job was
triggered due to any content changes and the authorities they are associated with.
Returns | |
---|---|
Uri[] |
boolean isOverrideDeadlineExpired ()
For jobs with 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.
Returns | |
---|---|
boolean |
void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel :
The Parcel in which the object should be written. |
flags |
int :
Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE .
|