Skip to content

Instantly share code, notes, and snippets.

@sivabudh
Created September 18, 2014 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sivabudh/4a0a197819ab220563d5 to your computer and use it in GitHub Desktop.
Save sivabudh/4a0a197819ab220563d5 to your computer and use it in GitHub Desktop.
Intent intent = new Intent();
intent.setComponent(new ComponentName("cng.android.timesheet", "cng.android.timesheet.Splash"));
List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent,
PackageManager.MATCH_DEFAULT_ONLY);
if (list.size() > 0){
startActivity(intent);
} else {
String url = "http://appstore.g-able.com/timesheet/";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment