java.lang.Object | |
↳ | android.app.job.JobScheduler |
Class for scheduling various types of jobs with the scheduling framework on the device.
You do not
instantiate this class directly; instead, retrieve it through
Context.getSystemService(Context.JOB_SCHEDULER_SERVICE)
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | RESULT_FAILURE | Returned from schedule(JobInfo) when an invalid parameter was supplied. |
|||||||||
int | RESULT_SUCCESS | Returned from schedule(JobInfo) if this application has made too many requests for
work over too short a time. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Cancel a job that is pending in the JobScheduler.
| |||||||||||
Cancel all jobs that have been registered with the JobScheduler by this package.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returned from schedule(JobInfo)
when an invalid parameter was supplied. This can occur
if the run-time for your job is too short, or perhaps the system can't resolve the
requisite JobService
in your package.
Returned from schedule(JobInfo)
if this application has made too many requests for
work over too short a time.
Cancel a job that is pending in the JobScheduler.
jobId | unique identifier for this job. Obtain this value from the jobs returned by
getAllPendingJobs() . |
---|
Cancel all jobs that have been registered with the JobScheduler by this package.
job | The job you wish scheduled. See
JobInfo.Builder for more detail on the sorts of jobs
you can schedule. |
---|