I have a simple Android activity with a single dependency. I inject the dependency into the activity\'s onCreate like this:
Dagger_HelloComponen
With Dagger2, you can pass a specific module (the TestModule there) to a component using the generated builder api.
ApplicationComponent appComponent = Dagger_ApplicationComponent.builder()
.helloModule(new TestModule())
.build();
Please note that, Dagger_ApplicationComponent is a generated class with the new @Component annotation.