JobScheduler
provides a flexible framework to intelligently accomplish background services.JobScheduler
is only available on devices running API 21 and higher.- To use the
JobScheduler
, you need two parts:JobService
andJobInfo
. JobInfo
is a set of conditions that trigger the job to run.JobService
implements the job to run under the conditions specified byJobInfo
.- You only have to implement the
onStartJob()
andonStopJob()
callback methods, which you do in yourJobService
. - The implementation of your job occurs, or is started, in
onStartJob()
. - The
onStartJob()
method returns aboolean
value that indicates whether the service needs to process the work in a separate thread. - If
onStartJob()
returnstrue
, you must explicitly calljobFinished()
. IfonStartJob()
returnsfalse
, the runtime callsjobFinished()
on your behalf. JobService
is processed on the main thread, so you should avoid lengthy calculations or I/O.JobScheduler
is the manager class responsible for scheduling the task.JobScheduler
batches tasks to maximize the efficiency of system resources, which means that you do not have exact control of when tasks are executed.
-
Notifications
You must be signed in to change notification settings - Fork 0
mutwakilmo/NotificationScheduler
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description or website provided.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published