Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking back to amazon app store for ratings [duplicate]

Tags:

I am currently using the following code within my android app on The Google Play Store to request a review and a rating of my app.

Intent goToMarket = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.yapp.blah"));
goToMarket.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(goToMarket);

How can I link back to The Amazon App Store or Amazon Market to achieve the same thing?

like image 383
Ahmed Avatar asked Jul 09 '12 10:07

Ahmed


People also ask

How do I link to my Amazon app?

Find the product that you would like to share with someone. Scroll down and tap the horizontal gray Share button (old versions of the Amazon app), or tap the Share icon on the product picture (new versions of the Amazon app). Select the method that you would like to use to share the link to the product.

What is Amazon deep link?

One way that you can promote your apps is to provide a link directly to the Amazon Appstore or Amazon retail website from within your app. This type of link is called a "deep link" and can be used for several purposes: Linking to the paid version of your app in the Amazon Appstore.

How do I update my Amazon Appstore?

From the Dashboard (the default homepage), under the Amazon Appstore section, click App List. Click the app you want to update. Near the top of the page, in the area below the name of your app, click Add Upcoming Version. A confirmation message appears — click OK to proceed.


2 Answers

Just use following code. It's at first trying to open market application by URI, but if it is not found open web link.

public static final String MARKET_AMAZON_URL = "amzn://apps/android?p=";
public static final String WEB_AMAZON_URL = "http://www.amazon.com/gp/mas/dl/android?p=";

    private static void openOnAmazonMarket(Context context, String packageName) {

    try {
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(MARKET_AMAZON_URL + packageName));
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    } catch (android.content.ActivityNotFoundException anfe) {
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(WEB_AMAZON_URL + packageName));
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }

}

For Google Play and Samsung Galaxy Apps links are following:

public static final String MARKET_GOOGLE_URL = "market://details?id=";
public static final String WEB_GOOGLE_URL = "http://play.google.com/store/apps/details?id=";

public static final String MARKET_SAMSUNG_URL = "samsungapps://ProductDetail/";
public static final String WEB_SAMSUNG_URL = "http://www.samsungapps.com/appquery/appDetail.as?appId=";
like image 163
AndreyICE Avatar answered Sep 28 '22 16:09

AndreyICE


You can do the following things:

  1. Check if the device based on its Manufacturer. For ex: https://developer.amazon.com/sdk/fire/specifications.html

  2. For writing reviews and opening the Amazon App Store use the following intent

    amzn://apps/android?p=package_name
    

    where p=Link to the detail page for a specific package name.

Ref: Amazon developer link.

https://developer.amazon.com/sdk/in-app-purchasing/sample-code/deeplink.html

like image 43
Sagar Waghmare Avatar answered Sep 28 '22 14:09

Sagar Waghmare