Created
March 11, 2018 16:45
-
-
Save sharifulislam52/9703436bf05ba4bee02f80d3371bb08d to your computer and use it in GitHub Desktop.
Open app from google play store
This file contains hidden or 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
Uri uri = Uri.parse("market://details?id=" + context.getPackageName()); | |
Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri); | |
goToMarket.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | | |
Intent.FLAG_ACTIVITY_NEW_DOCUMENT | | |
Intent.FLAG_ACTIVITY_MULTIPLE_TASK); | |
try { | |
startActivity(goToMarket); | |
} catch (ActivityNotFoundException e) { | |
startActivity(new Intent(Intent.ACTION_VIEW, | |
Uri.parse("http://play.google.com/store/apps/details?id=" + context.getPackageName()))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment