Skip to content

Instantly share code, notes, and snippets.



Last active Apr 26, 2019
What would you like to do?
How to Open SugarWOD from another Android App
// Adapted from:
/** Open SugarWOD.
* @param context current Context, like Activity, App, or Service
* @return true if likely successful, false if unsuccessful
public static boolean openSugarWOD(Context context) {
String packageName = "com.flatironssoftware.sugarwod";
PackageManager manager = context.getPackageManager();
try {
Intent i = manager.getLaunchIntentForPackage(packageName);
if (i == null) {
return false;
return true;
} catch (ActivityNotFoundException e) {
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment