Skip to content

Instantly share code, notes, and snippets.

@hu2di
Last active May 3, 2018 13:13
Show Gist options
  • Save hu2di/4c533db1c27bcf16fbe1648841c5d3f0 to your computer and use it in GitHub Desktop.
Save hu2di/4c533db1c27bcf16fbe1648841c5d3f0 to your computer and use it in GitHub Desktop.
Android: Intent Review App
final String appPackageName = getActivity().getPackageName(); // from Context
try {
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("market://details?id=" + appPackageName)));
} catch (android.content.ActivityNotFoundException anfe) {
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment