Initializer


public interface Initializer<T>

Known direct subclasses
EmojiCompatInitializer

Initializer for configuring EmojiCompat with the system installed downloadable font provider.

ProcessLifecycleInitializer

Initializes ProcessLifecycleOwner using androidx.startup.

ProfileInstallerInitializer

Startup library initializer that installs an AOT profile several seconds after launch.

StartupTracingInitializer

Enables tracing at app startup if configured prior to app starting

WorkManagerInitializer

Initializes androidx.work.WorkManager using androidx.startup.


Initializes library components during app startup. Discovered and initialized by InitializationProvider.

Parameters
<T>

The type of the component being initialized.

Summary

Public methods

abstract @NonNull T

Initializes a library component within the application Context.

abstract @NonNull List<Class<Initializer<Object>>>

Gets a list of this initializer's dependencies.

Public methods

create

Added in 1.0.0
abstract @NonNullcreate(@NonNull Context context)

Initializes a library component within the application Context.

Parameters
@NonNull Context context

The application context.

dependencies

Added in 1.0.0
abstract @NonNull List<Class<Initializer<Object>>> 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<Class<Initializer<Object>>>

A list of initializer dependencies.