dlucci dlucci - 27 days ago 6
Android Question

Is there an Android library like RoboGuice for Dagger?

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!

Answer

According to this thread on the Dagger issues list, you can accomplish this behavior but you need to inject it via a module, as discussed here

Comments