ProcessLifecycleInitializer


public final class ProcessLifecycleInitializer implements Initializer


Initializes ProcessLifecycleOwner using androidx.startup.

Summary

Public constructors

Public methods

@NonNull LifecycleOwner

Initializes a library component within the application Context.

@NonNull List<@NonNull Class<@NonNull Initializer<@NonNull ?>>>

Gets a list of this initializer's dependencies.

Public constructors

ProcessLifecycleInitializer

Added in 2.4.0
public ProcessLifecycleInitializer()

Public methods

create

Added in 2.4.0
public @NonNull LifecycleOwner create(@NonNull Context context)

Initializes a library component within the application Context.

Parameters
@NonNull Context context

The application context.

dependencies

Added in 2.4.0
public @NonNull List<@NonNull Class<@NonNull Initializer<@NonNull ?>>> dependencies()

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
@NonNull List<@NonNull Class<@NonNull Initializer<@NonNull ?>>>

A list of initializer dependencies.