
Learn the basics of dependency and dependency management, illustrated by a graph of main activity, menu model, repository, database, and network service dependencies.
Continue building a Dagger stage 1 project by creating data, user interface, network, and database packages and implementing a network service and repository scaffold for dependency injection.
Build a repository and view model with dagger stage one part two, wiring database service and network service using context to manage dependencies.
Improve previous Android projects by passing dependencies through the constructor, replacing hardcoded values with constructor parameters for database and network services, boosting configurability and reusability.
Learn inversion of control and dependency injection by never creating dependencies inside classes, instead providing services and repositories from the outside through constructors.
Implement inversion of control in an Android app by injecting a database service and network service through a repository constructor, created externally and wired via view model and main activity.
Explore how Dagger automates dependency creation and management by teaching modules, components, and providers, and show how repositories, database, and network service are supplied to consumers.
Learn the basic Dagger annotations, including module, provides, component, singleton, and inject, and see how to declare providers for models and inject dependencies into view models, database, and network services.
Learn how to add Dagger dependencies to your Gradle project, choose implementation over api for performance, and configure kapt annotation processing to enable Dagger modularization.
Learn to configure Dagger dependency injection by creating an application component and module, builder, and inject methods to supply database, network services, and API key in an Android app.
See how dagger performs dependency injection behind the scenes, wiring database and network services through the application module and generated components. Observe inject and factory code creating service instances.
Learn how Dagger singleton ensures a single instance of heavy services across the app lifecycle, preventing multiple database and network service instances by applying singleton scope on the application component.
Wire the main view model dependencies via an activity module and component, providing the repository, database service, and network service to the main activity, and ensure these services are singletons.
Learn how to share a single instance of service and network service across the app using Dagger 2, the application component, and module dependencies, and why scope matters.
Apply dagger 2 custom scoping to manage shared instances across application and activity components, exposing database and network services from the application component for use within the activity scope.
Implement a singleton repository in the application model to provide a single shared repository across components via dependency injection, ensuring the same instance is used by activities and view models.
Adopt Dagger constructor injection by moving from field injection to constructor wiring. Inject the repository into the main view model and remove old providers.
Implement constructor injection for the database service with Dagger 2 and configure the application module to provide context and the database name, validating the singleton instance.
Explore constructor injection for a network service with dagger 2, configuring the application module to provide api key and context, and learn how a qualifier resolves string binding conflicts.
Discover how Dagger 2 qualifiers distinguish identical types, create custom qualifier annotations with retention, and inject API keys and database names in a DI setup.
In this course we will learn android dependency injection from scratch. In the first section of the course we will learn dependency injection by creating different project and implementing a best practice in dependency injection. In the second section of this course we will learn about the Dagger 2 and android dependency injection with dagger in a practical way.
This course is for anyone who is interested in learning Android Dependency Injection With Dagger. By the end of the course you will have a good understanding about dependency injection and Dagger 2.