| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
long |
getBackoffMs()
Only valid if the job isn't periodic.
|
JobRequest.BackoffPolicy |
getBackoffPolicy()
Only valid if the job isn't periodic.
|
long |
getEndMs()
Only valid if the job isn't periodic.
|
PersistableBundleCompat |
getExtras() |
int |
getFailureCount()
|
long |
getFlexMs()
Flex time for this job.
|
int |
getId() |
long |
getIntervalMs()
Only valid if the job is periodic.
|
long |
getScheduledAt()
Returns the time when this job was scheduled.
|
long |
getStartMs()
Only valid if the job isn't periodic.
|
java.lang.String |
getTag() |
int |
hashCode() |
boolean |
isExact() |
boolean |
isPeriodic() |
boolean |
isPersisted() |
JobRequest.NetworkType |
requiredNetworkType()
Call
Job.isRequirementNetworkTypeMet() to check whether this requirement is fulfilled. |
boolean |
requirementsEnforced() |
boolean |
requiresCharging()
Call
Job.isRequirementChargingMet() to check whether this requirement is fulfilled. |
boolean |
requiresDeviceIdle()
Call
Job.isRequirementDeviceIdleMet() to check whether this requirement is fulfilled. |
public int getId()
Job.JobRequest.getJobId()public java.lang.String getTag()
Job which was passed in the constructor of the JobRequest.Builder.JobRequest.getTag()public boolean isPeriodic()
Job is periodic or not. If this Job is periodic, then
you shouldn't return Job.Result.RESCHEDULE as result.JobRequest.isPeriodic()public boolean isExact()
true if this job was scheduled at an exact time by calling JobRequest.Builder.setExact(long).JobRequest.isExact()public boolean isPersisted()
true, then the job persists across reboots.JobRequest.isPersisted()public long getStartMs()
JobRequest.getStartMs()public long getEndMs()
JobRequest.getEndMs()public long getIntervalMs()
JobRequest.getIntervalMs()public long getFlexMs()
JobRequest.getFlexMs()public long getScheduledAt()
public long getBackoffMs()
getBackoffPolicy()
if the job fails multiple times.JobRequest.getBackoffMs()public JobRequest.BackoffPolicy getBackoffPolicy()
JobRequest.getBackoffPolicy()public boolean requiresCharging()
Job.isRequirementChargingMet() to check whether this requirement is fulfilled.true, then the job should only run if the device is charging.JobRequest.requiresCharging()public boolean requiresDeviceIdle()
Job.isRequirementDeviceIdleMet() to check whether this requirement is fulfilled.true, then job should only run if the device is idle.JobRequest.requiresDeviceIdle()public JobRequest.NetworkType requiredNetworkType()
Job.isRequirementNetworkTypeMet() to check whether this requirement is fulfilled.JobRequest.requiredNetworkType()public boolean requirementsEnforced()
true, then all requirements are checked before the job runs. If one requirement
isn't met, then the job is rescheduled right away.JobRequest.requirementsEnforced()public int getFailureCount()
Job was rescheduled or if a periodic
Job wasn't successful.public PersistableBundleCompat getExtras()
Job. Never returns null.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object