Dagger Android — Behind the Scenes

Picture by Ian Dooley on Unsplash

Understanding Dagger 2 itself is already a challenge for many. With Dagger Android, it becomes even more confusing with how things works. So I took the time to dissect and demystify it.

The very basics of Dagger 2

Let’s start with most basic. Dependency Injection is a way to inject Dependency into a class object, in our case MainActivity.

--

--

--

Sharing iOS, Android and relevant Mobile App Development Technology and Learning

Recommended from Medium

Create a ChipGroup with Jetpack Compose

Using Buttons in React Native

Lifecycle-aware Lazy Property in Kotlin for Android Development

Flutter Useful Extensions

How to Add Manifest Permission to an Application

Download File in Android with Kotlin

Augmented Reality(AR) in Android

ARCore sample project

Setup Dagger 2 on Kotlin Project

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Elye

Elye

Sharing Software Development Experience, focus on Mobile. https://elye-project.medium.com/subscribe https://twitter.com/elye_project

More from Medium

Learn Jetpack Compose Crossfade Animation

Exposing the separate resources module to iOS target using moko-resources in KMM

Practical Jetpack Compose: Get the beta!

Tinkering around Gradle plugin basics