Job Scheduling

suggest change

Versions

JobScheduler on this page was documented against Android 5.0 through 7.1.

Remarks

Beware of running lots of code or doing heavy work inside your JobService, for example in onStartJob(). The code will run on the main/UI thread and therefore can lead to a blocked UI, no longer responding app or even a crash of your app!

Because of that, you must offload the work, for example by using a Thread or AsyncTask. Return true from onStartJob when that work is still running, and call jobFinished when it ends. Returning false tells the scheduler the job is already finished.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents