WorkManagerInitializer


class WorkManagerInitializer : Initializer


Initializes androidx.work.WorkManager using androidx.startup.

Summary

Public constructors

Public functions

WorkManager
create(context: Context)

Initializes a library component within the application Context.

(Mutable)List<Class<Initializer<Any!>!>!>

Gets a list of this initializer's dependencies.

Public constructors

WorkManagerInitializer

Added in 2.7.0
WorkManagerInitializer()

Public functions

create

Added in 2.7.0
fun create(context: Context): WorkManager

Initializes a library component within the application Context.

Parameters
context: Context

The application context.

dependencies

Added in 2.7.0
fun dependencies(): (Mutable)List<Class<Initializer<Any!>!>!>

Gets a list of this initializer's dependencies. Dependencies are initialized before the dependent initializer. For example, if initializer A defines initializer B as a dependency, B is initialized before A.

Returns
(Mutable)List<Class<Initializer<Any!>!>!>

A list of initializer dependencies.