Skip to content

Most visited

Recently visited

navigation

JobServiceEngine

public abstract class JobServiceEngine
extends Object

java.lang.Object
   ↳ android.app.job.JobServiceEngine


Helper for implementing a Service that interacts with JobScheduler. This is not intended for use by regular applications, but allows frameworks built on top of the platform to create their own Service that interact with JobScheduler as well as add in additional functionality. If you just want to execute jobs normally, you should instead be looking at JobService.

Summary

Public constructors

JobServiceEngine(Service service)

Create a new engine, ready for use.

Public methods

final IBinder getBinder()

Retrieve the engine's IPC interface that should be returned by onBind(Intent).

void jobFinished(JobParameters params, boolean needsReschedule)

Call in to engine to report that a job has finished executing.

abstract boolean onStartJob(JobParameters params)

Engine's report that a job has started.

abstract boolean onStopJob(JobParameters params)

Engine's report that a job has stopped.

Inherited methods

From class java.lang.Object

Public constructors

JobServiceEngine

added in API level 26
JobServiceEngine (Service service)

Create a new engine, ready for use.

Parameters
service Service: The Service that is creating this engine and in which it will run.

Public methods

getBinder

added in API level 26
IBinder getBinder ()

Retrieve the engine's IPC interface that should be returned by onBind(Intent).

Returns
IBinder

jobFinished

added in API level 26
void jobFinished (JobParameters params, 
                boolean needsReschedule)

Call in to engine to report that a job has finished executing. See jobFinished(JobParameters, boolean) JobService.jobFinished} for more information.

Parameters
params JobParameters

needsReschedule boolean

onStartJob

added in API level 26
boolean onStartJob (JobParameters params)

Engine's report that a job has started. See JobService.onStartJob for more information.

Parameters
params JobParameters

Returns
boolean

onStopJob

added in API level 26
boolean onStopJob (JobParameters params)

Engine's report that a job has stopped. See JobService.onStopJob for more information.

Parameters
params JobParameters

Returns
boolean

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.