title: Dagger 2 - Constructor injection - Scope
body: <p>I'm using Dagger 2 with simple MVP pattern. I have a <code>@PerApp</code> and <code>@PerActivity</code> scopes. I'm injecting presenters dependencies using constructor injection, which makes those presenters "injectable" (I don't need to write provides methods in activity module). Code fragments:</p>
  
  <p><strong>PerApp:</strong></p>
  
  <pre><code>// AppComponent
  @PerApp
  @Component(modules = {AppModule.class, DataModule.class, NetworkModule.class})
  public interface AppComponent {
      LoginComponent plus(LoginModule loginModule);
  
      MainComponent plus(MainModule mainModule);
  }
  
  // Example @PerApp module
  @Module
  public class NetworkModule {
  
      @Provides
      @PerApp
      Retrofit providesRetrofit(){
           ...
      }
  }
  </code></pre>
  
  <p><strong>PerActivity:</strong></p>
  
  <pre><code>// LoginModule
  @Module
  public class LoginModule {
      private final LoginActivity mLoginActivity;
  
      public LoginModule(LoginActivity loginActivity) {
          mLoginActivity = loginActivity;
      }
  
      @Provides
      @PerActivity
      Context providesContext() {
          return mLoginActivity;
      }
  }
  
  // LoginComponent
  @PerActivity
  @Subcomponent(
          modules = LoginModule.class
  )
  public interface LoginComponent {
      void inject(LoginActivity loginActivity);
  }
  </code></pre>
  
  <p>Activity:</p>
  
  <pre><code>public class LoginActivity {
      @Inject LoginPresenter mPresenter;
  }
  </code></pre>
  
  <p>Presenter:</p>
  
  <pre><code>public class LoginPresenter {
  
      @Inject
      public LoginPresenter(Retrofit retrofit) {
          ...
      }
  }
  </code></pre>
  
  <p>It's working great. My question is: What will be the scope of provided <code>LoginPresenter</code>? Is it gonna be the same as <code>LoginActivity</code>? Should I annotate the presenter's constructor with <code>@PerActivity</code> or something?</p>