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

Initializer

public interface Initializer

androidx.startup.Initializer<T>


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

Summary

Public methods

abstract T create(Context context)

Initializes and a component given the application Context

abstract List<Class<? extends Initializer<?>>> dependencies()

Public methods

create

public abstract T create (Context context)

Initializes and a component given the application Context

Parameters
context Context: The application context.

Returns
T

dependencies

public abstract List<Class<? extends Initializer<?>>> dependencies ()

Returns
List<Class<? extends 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`.