Monday, June 22, 2015

RoboGuice - Android development made simple and fun

"Simple and Fun!" Now, they make quite a promise!

read up:

Maven repo:


OK, so most of all RoboGuice is about DEPENDENCY INJECTION


TextView label;

@InjectResource(R.string.app_name) // strings, drawables
String applicationName;

@Inject // system service
LayoutInflater layoutInflater;

LocationManager locationManager;

@Inject // POJO
Book book;

Creating Activities

public class FightForcesOfEvilActivity extends RoboActivity {

TextView expletiveText;

Creating Android Modules

public class MyModule extends AbstractModule {
protected void configure() { }


public static class AsyncPunch extends RoboAsyncTask {

// Astroboy is a @Singleton public class Astroboy {
@Inject Astroboy astroboy;

// new instance of java.util.Random, since we haven't specified any binding instructions
@Inject Random random;

If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins