I'm in the process of switching my app over from RoboGuice to Dagger. RoboGuice has this nice feature where you can inject native components (@Inject Context mContext gives you a Context object). I was wondering if anyone knew of an extension to Dagger or another DI library that can do this. Thanks!
Asked
Active
Viewed 412 times
0
-
May I ask you why you are switching to Dagger? Just out of interest. – fweigl Mar 19 '15 at 18:18
-
you can do the same via dagger – user2511882 Mar 19 '15 at 18:21
-
I am changing because I want to play around with Dagger on a larger project to really see what the benefit is. Also, it seems like an interesting challenge – dlucci Mar 19 '15 at 18:21
-
do check http://androidannotations.org/ – sakis kaliakoudas Nov 05 '15 at 17:41
2 Answers
0
Yeah, that's too easy with Dagger, so there is no need in this feature out-of-the box.
Moreover, you can specifically control which context to inject, it's really useful to inject activity context under its scope.

Dmitry Gryazin
- 933
- 1
- 11
- 24