Skip to content

Instantly share code, notes, and snippets.

@DHosseiny
Created May 26, 2023 13:29
Show Gist options
  • Save DHosseiny/406443373d8c495fda09026711f293b0 to your computer and use it in GitHub Desktop.
Save DHosseiny/406443373d8c495fda09026711f293b0 to your computer and use it in GitHub Desktop.
MyApplication2
@HiltAndroidApp
class MyApplication : Application(), Configuration.Provider {
@Inject
lateinit var hiltWorkerFactory: HiltWorkerFactory
override fun getWorkManagerConfiguration(): Configuration {
return Configuration.Builder()
.setWorkerFactory(hiltWorkerFactory)
.build()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment