Created
May 5, 2021 00:14
-
-
Save cmathew/01d44bf94177b469374ba370aab68310 to your computer and use it in GitHub Desktop.
Launch Play Store without resolveActivity
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
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