Dagger 2 - Injecting from multiple independently scoped components into a single object
问题 The issue that I'm facing is that I want to have two independent scopes that don't really fall into a parent-child hierarchy. In my case, I want two types of scopes: 1) "Feature" based scopes. e.g., when a user enters a feature, a scoped component is created. When the user leaves that feature, that scope is destroyed. 2) "Activity" based scopes (this is for an Android app, sorry about the terminology if you don't use Android). When an activity is created, a scoped component is created. When