Dagger-android, under the hood
summary
Walks through the generated code behind AndroidInjection.inject(this) for Dagger 2.10/2.11, shows how @Binds and @BindsInstance seed activity instances into builders, and reconstructs the DispatchingAndroidInjector map/multibindings that look up a factory by the component’s concrete class. Demonstrates the memory‑leak pitfall when builders hold instances and the provider fix that returns fresh factories, explains why exact runtime types are required for lookup, and shows how ContributesAndroidInjector removes boilerplate while actually generating subcomponents.
AI-written summary · about
chapters (8)
- 0:00Start
- 0:07Dagger-android
- 1:39Some context (not the class)
- 3:23Dependency injection
- 8:59@Bindsinstance
- 11:55Dagger 2.10
- 35:35Dagger 2.11
- 38:11Thank you!
related talks
41mIt,s complicated, but it doesn,t have to be: a Dagger journey
15mDagger Party Tricks
29mDIY Dependency Injection with Kotlin
49mDependency injection from zero to hero with Koin
44mHilt: Dependency Injection for the mere mortals
35mDagger Reflect - The circle from runtime to compile time and back to runtime
17mKoin vs Dagger (Service Locator vs D.I.)
42mAndroid Architecture Design with Koin
