Last active
November 2, 2015 01:54
-
-
Save justintuchek/46e7c310d8a13e34369a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IntentFactory { | |
private IntentFactory() { | |
throw new AssertionError("no instances."); | |
} | |
public static <T extends Activity> Intent createExplicit(@NonNull Class<T> c) { | |
Intent explicitIntent = new Intent(); | |
ComponentName componentName = new ComponentName(BuildConfig.APPLICATION_ID, c.getName()); | |
explicitIntent.setComponent(componentName); | |
return new Intent(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment