Hey I am using Koin in my application. I am trying to inject workmanager in my application according to this answer. I did this successfully but I have little bit confused about workManagerFactory()
Module.kt
val workerModule = module {
// worker definition
worker { SimpleWorker(get(), get(), get()) }
}
so when startKoin
startKoin {
androidLogger(Level.ERROR)
androidContext(appContext)
modules(
listOf(
workerModule
)
)
}
Do I need to add wokerModule in modules as well as workManagerFactory()?
startKoin {
androidLogger(Level.ERROR)
androidContext(appContext)
modules(
listOf(
workerModule
)
)
workManagerFactory()
}
what is the use case workManagerFactory()
? Can someone please guide me because I am reading this medium post. Nothing is mention about it. Thanks