Redirect the user to the App Store on Android

It is known that we can send the intention, as described in the following link, and then redirects the user to Google Play.

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

But the problem is that all app stores, especially the Amazon App Store (in the Kindle), can handle this intention?
I know that the following URI should redirect the user to the Amazon app store:

http://www.amazon.com/gp/mas/dl/android?p=package

But, I do not want to have two binaries , one for regular Android and the other for Amazon.

+5
source share
1 answer

There is no general method, here you need to set a bunch of flags in your code.

so you have something like

boolean AMAZON_APK=true;
boolean ANDROID_APK =false;
....

, amazon, Android Play. if , . , .

if(AMAZON_APK)
  //launch amazon intent
if(ANDROID_APK)
  //launch android market intent
....

. App Store Amazon Intent ?, , - , - .

+3

All Articles