Skip to content

Instantly share code, notes, and snippets.

@mrmojtabaa
Created January 19, 2019 20:26
Show Gist options
  • Save mrmojtabaa/d68212a50063693c571c5ea7d59fcfa2 to your computer and use it in GitHub Desktop.
Save mrmojtabaa/d68212a50063693c571c5ea7d59fcfa2 to your computer and use it in GitHub Desktop.
class myApplication : Application(), HasActivityInjector {
@Inject
lateinit var activityInjector: DispatchingAndroidInjector<Activity>
override fun onCreate() {
super.onCreate()
var appComponent = DaggerAppComponent.create()
appComponent.inject(this)
}
override fun activityInjector(): AndroidInjector<Activity> {
return activityInjector
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment