Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open the Amazon AppStore directly from my Android application?

I have seen answers regarding Amazon Appstore from iPhone but not from Android. I'm trying to make a button that will open the Amazon Appstore (for android) on my app's page.

Here is how it's done for Google Play:

final String appPackageName = context.getPackageName();

try {
    activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)); 
} catch (android.content.ActivityNotFoundException e) {
    activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName));
}

How should I replace the Strings so that it works "the same" for the Amazon AppStore?

like image 761
UFC Insider Avatar asked Mar 14 '23 01:03

UFC Insider


1 Answers

The Amazon app store URI is

amzn://apps/android?

Directing to a particular app would look like

amzn://apps/android?p=com.amazon.mp3

Source: Linking To the Amazon Appstore for Android

like image 98
OneCricketeer Avatar answered Apr 27 '23 15:04

OneCricketeer