Question

I would like to link to Android Marketplace from within my app so I can send my user to write a review. I already know how to link to the Android Marketplace with a WebView, but this doesn't really set the user up to write a review. I need to open up Marketplace on the device and go to purchase/review page for the app.

Was it helpful?

Solution

Similar to Tim's answer, but this will take the user directly to your app (rather than search results.

You can read more about the Market Intent here.

Uri marketUri = Uri.parse("market://details?id=" + getPackageName());
startActivity(new Intent.ACTION_VIEW).setData(marketUri);

(Note: Assumes your activity is in the same package as declared in your application's manifest. Otherwise, just hardcode your package instead of using getPackageName())

Edit: Documentation moved to Linking to Your Products. Thanks Chris Cirefice

OTHER TIPS

            String myUrl = "market://search?q=pname:com.your.package.name";
            Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(myUrl)) ;
            startActivity(i);

This will open up the Market application on the device and show the page for your application(or any app that you give the package name for). As far as I know your user will have to take it from there, I don't think there is anyway to deeplink to the reviews section.

This is how I've been doing it:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=your.package.name")));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top