Configuration
public
final
class
Configuration
extends Object
| java.lang.Object | |
| ↳ | 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 | |
|---|---|
class |
Configuration.Builder
A Builder for |
Constants | |
|---|---|
int |
MIN_SCHEDULER_LIMIT
The minimum number of system requests which can be enqueued by |
Public methods | |
|---|---|
Executor
|
getExecutor()
|
int
|
getMaxJobSchedulerId()
|
int
|
getMinJobSchedulerId()
|
WorkerFactory
|
getWorkerFactory()
|
Inherited methods | |
|---|---|
Constants
MIN_SCHEDULER_LIMIT
public static final int MIN_SCHEDULER_LIMIT
The minimum number of system requests which can be enqueued by WorkManager
when using JobScheduler or AlarmManager.
Constant Value: 20 (0x00000014)
Public methods
getExecutor
public Executor getExecutor ()
| Returns | |
|---|---|
Executor |
The Executor used by WorkManager to execute Workers
|
getMaxJobSchedulerId
public int getMaxJobSchedulerId ()
| Returns | |
|---|---|
int |
The last valid id (inclusive) used by WorkManager when
creating new instances of JobInfos. If the current
jobId goes beyond the bounds of the defined range of
(getMinJobSchedulerId(),
getMaxJobSchedulerId()), it is reset to
(getMinJobSchedulerId()).
|
getMinJobSchedulerId
public int getMinJobSchedulerId ()
| Returns | |
|---|---|
int |
The first valid id (inclusive) used by WorkManager when creating new
instances of JobInfos. If the current jobId goes
beyond the bounds of the defined range of
(getMinJobSchedulerId(),
getMaxJobSchedulerId()), it is reset to
(getMinJobSchedulerId()).
|
getWorkerFactory
public WorkerFactory getWorkerFactory ()
| Returns | |
|---|---|
WorkerFactory |
The WorkerFactory used by WorkManager to create
ListenableWorkers
|
Interfaces
Classes
- ArrayCreatingInputMerger
- Configuration
- Configuration.Builder
- Constraints
- Constraints.Builder
- Data
- Data.Builder
- InputMerger
- ListenableWorker
- ListenableWorker.Result
- OneTimeWorkRequest
- OneTimeWorkRequest.Builder
- Operation.State
- Operation.State.FAILURE
- Operation.State.IN_PROGRESS
- Operation.State.SUCCESS
- OverwritingInputMerger
- PeriodicWorkRequest
- PeriodicWorkRequest.Builder
- RxWorker
- WorkContinuation
- Worker
- WorkerFactory
- WorkerParameters
- WorkInfo
- WorkManager
- WorkRequest
- WorkRequest.Builder
Enums
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.