Initializer


interface Initializer<T>

Known direct subclasses
ComposeTracingInitializer

Configures Perfetto SDK tracing in the app allowing for capturing Compose specific information (e.g. Composable function names) in a Perfetto SDK trace

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 functions

T
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 functions

create

Added in 1.0.0
fun create(context: Context): T

Initializes a library component within the application Context.

Parameters
context: Context

The application context.

dependencies

Added in 1.0.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.