Skip to content

Instantly share code, notes, and snippets.

@prokash-sarkar
Last active February 9, 2021 12:07
Show Gist options
  • Save prokash-sarkar/339bb01e176c4c59cad988f397cdda61 to your computer and use it in GitHub Desktop.
Save prokash-sarkar/339bb01e176c4c59cad988f397cdda61 to your computer and use it in GitHub Desktop.
open class BaseApplication : DaggerApplication() {
override fun applicationInjector(): AndroidInjector<out DaggerApplication> {
return initializeDaggerComponent()
}
open fun initializeDaggerComponent(): AppComponent {
val component: AppComponent = DaggerAppComponent.factory()
.create(this)
component.inject(this)
return component
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment