Skip to content

Instantly share code, notes, and snippets.

@goofyahead
Last active April 4, 2017 07:16
Show Gist options
  • Save goofyahead/bf8135afe23782c196d19ed1c9a746d7 to your computer and use it in GitHub Desktop.
Save goofyahead/bf8135afe23782c196d19ed1c9a746d7 to your computer and use it in GitHub Desktop.
public class Dagger2application extends Application implements HasDispatchingActivityInjector {
@Inject
DispatchingAndroidInjector<Activity> dispatchingActivityInjector;
@Override
public void onCreate() {
super.onCreate();
DaggerMyApplicationComponent.create().inject(this);
}
@Override
public DispatchingAndroidInjector<Activity> activityInjector() {
return dispatchingActivityInjector;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment