Created
March 3, 2015 22:54
-
-
Save lukaspili/348fd86a47a3df7cc55e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 DemortarApp extends Application { | |
private DataAccessComponent component; | |
public static DemortarApp getDemortarApp(Context context) { | |
return (DemortarApp) context.getApplicationContext(); | |
} | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
User loggedUser = new User(); // get logged user | |
component = Dagger_DataAccessComponent.builder() | |
.apiModule(new ApiModule(loggedUser)) | |
.databaseModule(new DatabaseModule()) | |
.build(); | |
} | |
public DataAccessComponent getComponent() { | |
return component; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment