HiltWorkerFactory
class HiltWorkerFactory : WorkerFactory
kotlin.Any | ||
↳ | androidx.work.WorkerFactory | |
↳ | androidx.hilt.work.HiltWorkerFactory |
Worker Factory for the Hilt Extension
A provider for this factory will be installed in the dagger.hilt.android.components.ApplicationComponent
.
Summary
Public constructors | |
---|---|
<init>(@NonNull workerFactories: MutableMap<String!, Provider<WorkerAssistedFactory<out ListenableWorker!>!>!>) |
Public methods | |
---|---|
ListenableWorker? |
createWorker(@NonNull appContext: Context, @NonNull workerClassName: String, @NonNull workerParameters: WorkerParameters) |
Public constructors
<init>
HiltWorkerFactory(@NonNull workerFactories: MutableMap<String!, Provider<WorkerAssistedFactory<out ListenableWorker!>!>!>)
Public methods
createWorker
@Nullable fun createWorker(
@NonNull appContext: Context,
@NonNull workerClassName: String,
@NonNull workerParameters: WorkerParameters
): ListenableWorker?