Created
May 17, 2018 19:00
-
-
Save maskaravivek/c2d03d1ac1fc4d01902f6ee709c25bc7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open class ExamplesApplication : Application(), HasActivityInjector { | |
@Inject lateinit var dispatchingActivityInjector: DispatchingAndroidInjector<Activity> | |
override fun onCreate() { | |
super.onCreate() | |
initAppComponent().inject(this) | |
} | |
open fun initAppComponent(): AppComponent { | |
return DaggerAppComponent | |
.builder() | |
.appModule(AppModule(this)) | |
.build() | |
} | |
override fun activityInjector(): DispatchingAndroidInjector<Activity>? { | |
return dispatchingActivityInjector | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment