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.


Initializers can be used to initialize libraries during app startup, without the need to use additional android.content.ContentProviders.

Parameters
<T>

The instance type being initialized

Summary

Public functions

T
create(context: Context)

Initializes and a component given the application Context

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

Public functions

create

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

Initializes and a component given the application Context

Parameters
context: Context

The application context.

dependencies

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

A list of dependencies that this Initializer depends on. This is used to determine initialization order of Initializers. For e.g. if a Initializer `B` defines another Initializer `A` as its dependency, then `A` gets initialized before `B`.