Dagger2Recipes-UserScope

简介:Example app which shows how to create UserScope in Dagger 2
更多:作者   提 Bug   
标签:

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.

Android 开发经验分享
C 轮融资近 30 亿元理财推荐
Android 开发经验分享
C 轮融资近 30 亿元理财推荐