MojRoid / memes

MVVM example app. Quick blog post detailing the layers: https://medium.com/@mojroid/clean-architecture-on-android-using-feature-modules-mvvm-view-slices-and-kotlin-e9ed18e64d83
187 stars 28 forks source link

Inject in Details Feature #2

Open mrnorbertf opened 6 years ago

mrnorbertf commented 6 years ago

Hi, it's very interesting example, but i notice you don't use injection in Details module. And as i see, you can't do it because AppComponent is in Installed module, and if you add injection in some instant app feature you couldn't get access to App and AppComponent. What do you think about it?

if you had been build it, this would have been successful. But in result you will get exception like: java.lang.RuntimeException: Unable to start activity ComponentInfo{moj.memes.debug/moj.memes.detail.MemesDetailActivity}: java.lang.RuntimeException: android.app.Application does not implement dagger.android.HasActivityInjector

MojRoid commented 5 years ago

Yep, I'm still wrapping my head around instant apps, but you're correct - need to investigate how best to have instant apps work with Dagger.