I am inspecting the latest samples in Android-L developer SDK. There is a sample class in
It's a new type of service, that is invoked for tasks that are scheduled to be run depending on system conditions (e.g. idle, plugged in).
Entry point for the callback from the JobScheduler.
This is the base class that handles asynchronous requests that were previously scheduled. You are responsible for overriding
onStartJob(JobParameters), which is where you will implement your job logic.
You basically create a
JobInfo object that describes these conditions (with
JobInfo.Builder) and set the component name of the service that must be executed.
To schedule them, you need the
JobScheduler, which you can access with
By the way, L Preview Documentation is here, in case you didn't know about it.
UPDATE: Here is the doc about JobService: https://developer.android.com/reference/android/app/job/JobService.html