# Configuration.Provider

Artifact: [androidx.work:work-runtime](https://developer.android.com/jetpack/androidx/releases/work) [View Source](https://cs.android.com/search?q=file:androidx/work/Configuration.kt+class:androidx.work.Configuration.Provider) Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/work#2.1.0)

*** ** * ** ***


```
public interface Configuration.Provider
```

<br />

*** ** * ** ***

A class that can provide the `https://developer.android.com/reference/androidx/work/Configuration` for WorkManager and allow for on-demand initialization of WorkManager. To do this:

- Disable `androidx.work.WorkManagerInitializer` in your manifest

- Implement the `https://developer.android.com/reference/androidx/work/Configuration.Provider` interface on your `https://developer.android.com/reference/android/app/Application.html` class

- Use [`WorkManager.getInstance(Context)`](https://developer.android.com/reference/androidx/work/WorkManager#getInstance(android.content.Context)) when accessing WorkManager (NOT [`WorkManager.getInstance`](https://developer.android.com/reference/androidx/work/WorkManager#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 |
|---|---|
| `https://developer.android.com/reference/androidx/work/WorkManager#initialize(android.content.Context,androidx.work.Configuration)` |   |

## Summary

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/Configuration` | `https://developer.android.com/reference/androidx/work/Configuration.Provider#getWorkManagerConfiguration()()` The `https://developer.android.com/reference/androidx/work/Configuration` used to initialize WorkManager |

## Public methods

### getWorkManagerConfiguration

Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/work#2.1.0)

```
abstract @NonNull Configuration getWorkManagerConfiguration()
```

The `https://developer.android.com/reference/androidx/work/Configuration` used to initialize WorkManager