Link to Amazon from within Your App
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.
- Linking to another one of your apps or all of your apps in the Amazon Appstore.
- Linking customers to the Amazon Appstore or retail website to write a review.
Types of Links and Base URLs
You have two options for providing a deep link to an Amazon client within your app. Each of these options requires a slightly different format for the link's base URL.
The following table describes the two link options and gives the base URL for each for the US-based Amazon website:
|Link to the Amazon Retail Website||This type of link uses standard URL format. You can test this type of link from any browser.|| http://www.amazon.com/gp
|Link directly to an Amazon Appstore app||This type of link is the preferred method and will directly open the Amazon Appstore app. Direct links use a special format which a regular browser does not recognize.||amzn://apps/android?|
Both link formats accept parameters to customize the final URL. The following table lists and describes the available parameters for linking to Amazon.
Note: Your app will not have an ASIN until the app is live on the Amazon Appstore. To add a deep link within your app before the app is live, use the p= parameter and specify the package name.
|s=||Add a search term. Use URL Encoding for special characters, such as spaces ( ).|
|p=||Link to the detail page for a specific Application ID. For more information, see Application Id.|
|initiatePurchaseFlow=true||(Optional) If you set this optional parameter, the link opens the purchase dialog of another app (without opening the app's detail page). An advantage of this method is that the user stays within the current app.|
|asin=||All apps in the catalog have a unique identifier known as an ASIN. Use this identifier to link directly to an app by its ASIN. The ASIN for an app can be found on its detail page.|
|showAll=1||Show all apps by the developer of the app corresponding to the specified package name or ASIN (requires "p" or "asin" arg)|
The following table shows examples for each of the parameters.
|Amazon Retail Web||http://www.amazon.com/gp/mas/dl/android?s=amazon%20mp3|
|Amazon Retail Web||http://www.amazon.com/gp/mas/dl/android?p=com.amazon.mp3|
|Amazon Retail Web||http://www.amazon.com/gp/mas/dl/android?initiatePurchaseFlow=true&asin=B004FRX0MY|
|Amazon Retail Web||http://www.amazon.com/gp/mas/dl/android?asin=B004FRX0MY|
|Amazon Retail Web||http://www.amazon.com/gp/mas/dl/android?p=com.amazon.mp3&showAll=1|
If you are using a URL for linking, you might need to implement some logic to handle different sites, such as international sites, to reference the proper Amazon domain. For example, for the US, a link such as: http://www.amazon.com/gp/mas/dl/android?p=com.example.myapp.apk will work in the US, but not in France.
In France, the equivalent link might be: http://www.amazon.fr/gp/mas/dl/android?p=com.example.myapp.apk.
To view the full list of countries/regions with their own Appstores, their domains, and where else residents of these countries/regions may shop for apps, see Countries and Territories Eligible to Shop for Apps.