Last active
February 5, 2018 16:56
-
-
Save iamBedant/5a1a7ab7d0a3b576e2619933f47f2cee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DemoApplication extends Application { | |
protected ApplicationComponent applicationComponent; | |
@Inject | |
DataManager dataManager; | |
public static DemoApplication get(Context context) { | |
return (DemoApplication) context.getApplicationContext(); | |
} | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
applicationComponent = DaggerApplicationComponent | |
.builder() | |
.applicationModule(new ApplicationModule(this)) | |
.build(); | |
applicationComponent.inject(this); | |
} | |
public ApplicationComponent getComponent(){ | |
return applicationComponent; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment