Skip to content

Instantly share code, notes, and snippets.

@cmathew
Created May 5, 2021 00:14
Show Gist options
  • Save cmathew/01d44bf94177b469374ba370aab68310 to your computer and use it in GitHub Desktop.
Save cmathew/01d44bf94177b469374ba370aab68310 to your computer and use it in GitHub Desktop.
Launch Play Store without resolveActivity
val playStoreIntent = Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.wealthfront")).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK
}
try {
context.startActivity(playStoreIntent)
} catch (ex: ActivityNotFoundException) {
goToPlayStoreUrl()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment