Last active
May 3, 2018 13:13
-
-
Save hu2di/4c533db1c27bcf16fbe1648841c5d3f0 to your computer and use it in GitHub Desktop.
Android: Intent Review App
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
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