Created
December 25, 2016 07:50
-
-
Save janishar/e20e3364b4265ab56dc4e0d33b3ea025 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