How to open "My account" of Google Play Store programmatically

Viewed 2702

I want to open up "My account" page of Google Play Store from my app by sending an intent.

I know how to open specific app's product details page in Google play store (Android developers: Linking to Your Products)

such as:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+appName)));

But now I want is to open "My account" to redirect user to check/adjust their payment methods or order history.

Is there any way to open "My account" page programmatically?

enter image description here

3 Answers

Maybe too late but this can be helpful for others.

You have to change the market link like this The link: market://search?q=pub:<publisher_name>

And then you can use it in your code.

One more thing use try catch so if any user doesn't have store installed in his device still visit the link and also prevent the app from crashing.

try{

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pub:<publisher_name>")));

}catch (android.content.ActivityNotFoundException ex) {

// If the market is not available in the store.
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/developer?id=<publisher_name>")));

}

Related