tags:

views:

449

answers:

1

Does anybody know of a way to use Guice to inject dependencies into the constructor of an Activity in Android? It looks like activities normally have only the default constructor so that the platform can easily create a new instance. While it is easy enough to have a singleton to reference the injector and get dependencies that way it is less clean and introduces a bit of static state.

Any suggestions?

+8  A: 

I don't know how I missed this!

http://code.google.com/p/roboguice/

Benju