juliocbcotta
03/28/2017, 6:21 PMAndroidInjector.inject
method, but I think I found a problem. The app uses custom scopes… like the feature Login has 3 Activities and one LoginModule that is responsable for sharing singletons that only should live in this scope. So in the first Activity I used to execute something like:
public class LoginActicity extends AppCompatActivity{
public void onCreate(Bundle bla){
LoginActivityComponent activityComponent = ((CustomApplication) getApplicationContext())
.plus(new LoginModule()) // generates LoginComponent and save the reference in the CustomApplication
.plus(new LoginActivityModule(this));
activityComponent.inject(this);
...
}
In the others activities I just execute ((CustomApplication) getApplicationContext()).getLoginComponent().plus(new ForgetPasswordModule()).inject(this)
How can I archive the same behavior when using AndroidInjector ?