johncarl81/transfuse — Issue #1: Activity Intent factory
Author: johncarl81
Created: 2012-02-23 01:54:27+00:00
State: open

Since we know what Activities require in terms of Extras, and which are optional (@Nullable) we should be able to create a factory class for building Activity transition Intents. Additionally, since we can inject the current Activity context, the api of this factory could be the following:

class IntentFactory{

public Intent buildActivityNameIntent(String extra1, int extra2){...}
}

with optional extras left to add as follows:

Intent intent = intentFactory.buildActivityNameIntent("blah", 42);
intent.putExtra("optionalValue", "hello");