Created
September 3, 2018 12:33
-
-
Save shubhamnikam/1a0a0f56b852e6dd71b2eea3fb5d2cce to your computer and use it in GitHub Desktop.
Implicit Intent - Open Google Play
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
intentGooglePlay.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
Uri uri = Uri.parse("market://details?id=" + getApplicationContext().getPackageName()); | |
Intent intent = new Intent(Intent.ACTION_VIEW, uri); | |
if (intent.resolveActivity(getPackageManager()) != null) { | |
startActivity(intent); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment