Initializer
interface Initializer<T : Any!>
androidx.startup.Initializer |
Initializer
s can be used to initialize libraries during app startup, without the need to use additional android.content.ContentProvider
s.
Summary
Public methods | |
---|---|
abstract T |
Initializes and a component given the application |
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 Initializer s. For e.g. if a Initializer `B` defines another Initializer `A` as its dependency, then `A` gets initialized before `B`. |