Google is committed to advancing racial equity for Black communities. See how.

Initializer

interface Initializer<T : Any!>
androidx.startup.Initializer

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

Summary

Public methods
abstract T
create(@NonNull context: Context)

Initializes and a component given the application Context

abstract MutableList<Class<out Initializer<*>!>!>

Public methods

create

@NonNull abstract fun create(@NonNull context: Context): T

Initializes and a component given the application Context

Parameters
context Context: The application context.

dependencies

@NonNull abstract fun dependencies(): MutableList<Class<out Initializer<*>!>!>
Return
MutableList<Class<out Initializer<*>!>!> 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`.