This is sample to show how dagger works with MVP architecture.
This sample uses two api sources one is Github repo list for a particular user. Another is List of jobs. These are open apis so we do not need authentication for this. On the home screen there are two buttons, Get Github Repo List takes us to the screen to get public repo list of the username we enter. and Get job list takes us to the screen where on clicking Get Jobs it fetches the list of jobs.
This sample shows how we can use dagger to remove dependencies from presenter so that we can write test cases by mocking api services or other dependencies that are required. This also shows how Dependent Components works with different scopes. There are 5 scopes with dependency shown in the diagram.
I have explained everything in detail here
Here are some nice articles to refer.
A superb sample covering real world scenerio.
Dependency Injection with Dagger 2.
An Introduction to Dagger 2.
Dagger 2. Part II. Custom scopes, Component dependencies, Subcomponents.