All Projects → frogermcs → Dagger2recipes Userscope

frogermcs / Dagger2recipes Userscope

Example app which shows how to create UserScope in Dagger 2

Programming Languages

java
68154 projects - #9 most used programming language

Dagger2Recipes: UserScope

Example app which shows how to create UserScope in Dagger 2


In theory all we have to do to create custom scope in Dagger 2 is:

  • Create scope annotation (e.g. @UserScope)
  • Create component which will keep scoped references (e.g. UserComponent).

But if we would like to use it in production Android app we need to care about Application/Activities lifecycles, restoring scope state between app launches, creating/keeping our custom component and much more.

Check blog post: Building UserScope with Dagger2 for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].