
Review the tutorial Android app code, highlighting coroutine-based data loading, Retrofit calls to the StackOverflow API, and RecyclerView navigation between list and details for Dagger and Hilt dependency injection.
Extract networking logic from the questions list activity into a fetch questions use case, encapsulating retrofit initialization and the StackOverflow API calls, and return a domain result.
Refactor the networking logic from the questions list and details screens into a standalone use case object, then practice the same refactoring via an offline git exercise.
Remove retrofit as a global proxy by moving StackOverflow API to constructors and exposing it from the application class, reducing duplication and making clients depend only on StackOverflow API.
Refactor screens navigator into an activity-scoped composition route and introduce an activity composition route alongside the app composition route, using lazy initialization to preserve lifecycle boundaries and clean abstractions.
Extract the dialogues navigator instantiation from activities into a composition route, and clarify the distinction with the activity composition route while obtaining the fragment manager and passing arguments.
Extract the dialogues navigator from activities into a composition route, choose the activity composition route due to fragment manager scope, and use a gateway to obtain the support fragment manager.
Extracts mvc views construction logic into a factory to handle a runtime container view group, enabling instantiation of questions list view mvc via a view mvc factory and layout inflator.
Extract the creation of the question details view mvc into a view mvc factory and remove the law of Demeter violation from the question details activity, completing a simple exercise.
This lecture clarifies the distinction between objects and data structures, showing that dependency injection concerns objects that expose behavior while data structures merely hold data, guided by composition rules.
Refactor with a dedicated injector to inject dependencies from outside, illustrating pure dependency injection while clarifying that this remains dependency injection rather than a service locator.
This lecture refactors dependency injection with Dagger conventions, turning the presentation component into an injector, removing custom injector and annotations, and using the inject annotation for code-generated injection.
Dagger allows a component to depend on multiple modules, sharing the same object graph, and can instantiate modules with no-argument constructors while bootstrapping dependencies are supplied for others.
Explore how to work with the ViewModel architecture component, its integration with Dagger two dependency injection framework, and the special treatment ViewModels require in Android apps.
Refactor view model factories to obey the law of demeter by injecting a provider. Delegate creation to Dagger, reducing duplicated constructor parameters and improving maintainability as view models grow.
Explore dagger multibinding for mapping multiple view models into a provider map. Keys use the view model class, enabling the factory to fetch the correct provider.
Learn to inject a saved state handle into Android view models using Dagger and Hilt. Wire save state registry owner through a presentation module to preserve data across process death.
simplify viewmodels by using a saved state viewmodel base and an init method, and implement dagger multi binding for a provider map to initialize them.
Align dependency injection with a component hierarchy, as Hilt's fundamental assumption does, including singleton, activity, activity retained, and ViewModel components with predefined scopes and default bindings.
Discover how Hilt injects dependencies behind the scenes through Android entrypoint annotations, wiring implicit components like singleton and activity components during application onCreate and activity onCreate (fragments onAttach).
In this course you'll learn all about Dependency Injection in Android and master Dagger and Hilt Dependency Injection frameworks. By the end of the course, you'll acquire an expert-level knowledge and will be ready to use Dagger, Hilt or manual Dependency Injection in your own Android applications.
A set of carefully designed, hands-on exercises will help you solidify your knowledge and allow you to practice using Dependency Injection in a controlled environment.
This course puts emphasis on professional, pragmatic and time-tested techniques and best practices. All the material that you'll learn has been thoroughly tested and evaluated in real production Android applications. You can even copy large parts of the source code from the tutorial application to your own projects to spare yourself much time and headache.
Professional grade
From fundamentals to best practices
Non-trivial examples
Hands-on exercises
Tutorial Android application on GitHub with step-by-step commits history for easier review
Many developers spend weeks learning Dagger, but, unfortunately, some still give up in the process. This course will make your learning journey more efficient and enjoyable, ensuring that you acquire these valuable skills, which are in exceptionally high demand in the Android industry.
So, if you want to learn Dependency Injection, Dagger and Hilt to develop clean and maintainable Android applications - this course is for you.