4

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 3

2

I don't know if this will work for all cases, but I had the same requirement and I solve it creating an intent to the account URL "https://play.google.com/store/account".

Uri uri = Uri.parse("https://play.google.com/store/account");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.addFlags(
    Intent.FLAG_ACTIVITY_NO_HISTORY |
    Intent.FLAG_ACTIVITY_NEW_DOCUMENT |
    Intent.FLAG_ACTIVITY_MULTIPLE_TASK
);
context.startActivity(intent);
1

Here is the list of ways by which Google Play Store can be called using Intent :

https://developer.android.com/distribute/marketing-tools/linking-to-google-play.html

1
  • I know this already, but it is not what I asked. Still thanks for your reply.
    – dargen
    Commented Mar 15, 2016 at 8:58
0

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>")));

}

1

Not the answer you're looking for? Browse other questions tagged or ask your own question.