Lateef Alabi-Oki
Jul 23, 2017 · 1 min read

By the way, you can have Dagger create the GameSession automatically. Instead of injecting the session just have the GameComponent interface return a method with a GameSession object.

@Component(modules = GameModule.class)
interface GameComponent {
GameSession session();
}

Then you can get the session from Dagger.

GameSession session = DaggerGameComponent.builder().build().session();

    Lateef Alabi-Oki

    Written by

    I'm a software designer passionate about creating powerful user experiences. Life, afterall, is all about people and experiences.