Configuration.Provider
public
static
interface
Configuration.Provider
androidx.work.Configuration.Provider |
A class that can provide the Configuration
for WorkManager and allow for on-demand
initialization of WorkManager. To do this:
- Disable
androidx.work.impl.WorkManagerInitializer
in your manifest - Implement the
Configuration.Provider
interface on yourApplication
class - Use
WorkManager.getInstance(Context)
when accessing WorkManger (NOTWorkManager.getInstance()
)
Note that on-demand initialization may delay some useful features of WorkManager such as automatic rescheduling of work following a crash and recovery from the application being force-stopped by the user or device.
See also:
Summary
Public methods | |
---|---|
abstract
Configuration
|
getWorkManagerConfiguration()
|
Public methods
getWorkManagerConfiguration
public abstract Configuration getWorkManagerConfiguration ()
Returns | |
---|---|
Configuration |
The Configuration used to initialize WorkManager
|