5

I want to write a review on amazon market from my application. However I can do this for android market using this code.

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

Than what should I do for doing same thing for Amazon market ?

Mahek
  • 803
  • 1
  • 8
  • 13

2 Answers2

11

For Amazon App Store check this link https://developer.amazon.com/help/faq.html It has a lot of helpful info. The answer to your question is under "Marketing"

Intent goToAppstore = new Intent(Intent.ACTION_VIEW,
       Uri.parse("http://www.amazon.com/gp/mas/dl/android?p=com.jakar.myapp"));
       goToAppstore.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
       context.startActivity(goToAppstore);

That will open the Amazon App store to myapp. (switch "com.jakar.myapp" with your package name of course).

For supporting both Android and Amazon marketplaces with the same APK file see this: How to support Amazon and Android Market (Google Play) links in same APK

Community
  • 1
  • 1
Reed
  • 14,703
  • 8
  • 66
  • 110
  • 1
    Amazon has moved the link to the Trademarks and Badges section way down the page under the Linking Instructions. https://developer.amazon.com/public/resources/marketing-tools/using-badges – Nathan Prather Feb 01 '14 at 02:30
  • But I found this page to be the one that solved the problem for me because I'm using an HTML5 Web App and wanted to just pass in my ASIN like this amzn://apps/android?asin=B004FRX0MY : https://developer.amazon.com/sdk/in-app-purchasing/sample-code/deeplink.html – Nathan Prather Feb 01 '14 at 03:32
0

Just use this code, nothing special:

Uri marketUri = Uri.parse("<link-to-the-amazon-market>");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(marketUri);
startActivity(intent);

This intent will work with any kind of Uri's it recognizes, if there is no special Uri form for the Amazon Market, just redirect the user to market's web page. Hope this helps.

Egor
  • 39,695
  • 10
  • 113
  • 130
  • but I have no "link-to-the-amazon-market" I it will available after uploading so I have used getPackgeName for android. but I am confuse about Initial link for amazon. can any one help me ? – Mahek Oct 05 '11 at 11:15