Configuration

class Configuration
kotlin.Any
   ↳ androidx.work.Configuration

The Configuration object used to customize WorkManager upon initialization. Configuration contains various parameters used to setup WorkManager. For example, it is possible to customize the Executor used by Workers here.

To set a custom Configuration for WorkManager, see WorkManager#initialize(Context, Configuration).

Summary

Nested classes

A Builder for Configurations.

Constants
static Int

The minimum number of system requests which can be enqueued by WorkManager when using android.app.job.JobScheduler or android.app.AlarmManager.

Public methods
Executor

WorkerFactory

Int

Int

Constants

MIN_SCHEDULER_LIMIT

static val MIN_SCHEDULER_LIMIT: Int

The minimum number of system requests which can be enqueued by WorkManager when using android.app.job.JobScheduler or android.app.AlarmManager.

Value: 20

Public methods

getExecutor

@NonNull fun getExecutor(): Executor
Return
Executor: The Executor used by WorkManager to execute Workers

getWorkerFactory

@NonNull fun getWorkerFactory(): WorkerFactory
Return
WorkerFactory: The WorkerFactory used by WorkManager to create ListenableWorkers

getMinJobSchedulerId

fun getMinJobSchedulerId(): Int
Return
Int: The first valid id (inclusive) used by WorkManager when creating new instances of android.app.job.JobInfos. If the current jobId goes beyond the bounds of the defined range of (Configuration.Builder#getMinJobSchedulerId(), Configuration.Builder#getMaxJobSchedulerId()), it is reset to (Configuration.Builder#getMinJobSchedulerId()).

getMaxJobSchedulerId

fun getMaxJobSchedulerId(): Int
Return
Int: The last valid id (inclusive) used by WorkManager when creating new instances of android.app.job.JobInfos. If the current jobId goes beyond the bounds of the defined range of (Configuration.Builder#getMinJobSchedulerId(), Configuration.Builder#getMaxJobSchedulerId()), it is reset to (Configuration.Builder#getMinJobSchedulerId()).