How can I do an Amazon App Store search using an Intent and filter it by developer name?
Asked Answered
G

5

4

Is there a way to start an Intent on the Kindle Fire that will cause the AppStore app to open and display all the apps for a certain developer? For instance, on a phone/tablet with the Android Market installed, I can do this:

Intent otherApps = new Intent(Intent.ACTION_VIEW,Uri.parse("market://search?q=pub:\"" + developerName + "\""));
activity.startActivity(otherApps);

And show all my apps in the Android Market. Can I do that with the Amazon App Store? If so, how? I've tried that Intent with other seemingly valid names (such as "ZeptoLab") and I don't get any filtering. It just drops me in the full unfiltered App Store. Looking up a specific app with "market://details?id=package.name" does seem to work.

Glaucous answered 22/11, 2011 at 23:55 Comment(0)
D
19

From https://developer.amazon.com/help/faq.html#Marketing:

To point to your app for marketing purposes use the URL http://www.amazon.com/gp/mas/dl/android?p=packagename (where packagename is your app package name).

If you want to link to the list of all your applications on the Amazon Appstore use the URL http://www.amazon.com/gp/mas/dl/android?p=packagename&showAll=1.

e.g. http://www.amazon.com/gp/mas/dl/android?p=com.rovio.angrybirds&showAll=1

All this can be seen here: https://developer.amazon.com/sdk/in-app-purchasing/sample-code/deeplink.html

Update(deep linking):

amzn://apps/android?p=
Darrel answered 23/11, 2011 at 19:50 Comment(0)
O
4

Best way is to look at their website (or here), which currently states this :

Omeara answered 14/4, 2015 at 21:5 Comment(0)
G
2

Here's the solution I came up with using the advice below from chiuki:

I added a boolean to one of my resource files that indicates whether or not the app is published in the Amazon AppStore or Android Market. Yeah, you have to change it whenever you publish your app, but think of it sort of like remembering to set debuggable to "false" when you publish. Put it on a check list. It goes like this:

In resource file:

 <bool name="app_is_in_amazon_app_store">true< /bool>

In code:

public class SomeUtil
{


 private static Boolean isInAmazonAppStore;


 public static boolean isInAmazonAppStore(Activity activity)
 {

       if (isInAmazonAppStore == null) 
        {
           isInAmazonAppStore =   activity.getResources().getBoolean(R.bool.app_is_in_amazon_app_store) ;
        }

       return isInAmazonAppStore;

 }

    public static void startOtherMarketAppsActivity(Activity activity)
    {
        try
        {
            Intent otherApps = null;

            if (isInAmazonAppStore(activity))
            {
              otherApps = new Intent(Intent.ACTION_VIEW,Uri.parse("http://www.amazon.com/gp/mas/dl/android?p=" + getPackageNameInAmazonAppStore(activity) + "&showAll=1")); 
            }
            else
            {
              otherApps = new Intent(Intent.ACTION_VIEW,Uri.parse("market://search?q=pub:\"" + getAndroidDeveloperName(activity) + "\""));
            }

            activity.startActivity(otherApps);
        }
        catch(Exception ex){  /* error handling */} 
}
Glaucous answered 29/11, 2011 at 3:5 Comment(0)
C
2

From - https://developer.amazon.com/help/tuabg.html

For in-app advertising or mobile browser based linking, please: Use this link structure: http:// www.amazon.com/gp/mas/dl/android?p=com.example.package/ref=mas_pm_app_name

For a link that directs to a list of all of your apps within our U.S. store, please: Use this link structure: http://www.amazon.com/gp/mas/dl/android?p=com.example.package&showAll=1

Now, you think amazon would have this correct on their own website, but the first part that I put in bold is wrong. This is what it should actually be:

http://www.amazon.com/gp/mas/dl/android?p=com.example.package&ref=mas_pm_app_name

Notice the & instead of the / between the package name and ref. Hopefully this helps some other people since this little detail wasted some of my time...

Clavichord answered 24/12, 2012 at 21:47 Comment(2)
I contacted Amazon and they fixed this issue in their documentationClavichord
It is also not correct. If you live in Germany for instance and you refer to the .com site then the app will be listed as 'not available due to geographic restrictions'Bosomed
P
2

Amazon supports their own deep links now: https://developer.amazon.com/appsandservices/apis/earn/in-app-purchasing/docs/deeplink

E.g. you can start an intent with uri amzn://apps/android?p=my.package.name.

Pamplona answered 16/8, 2014 at 11:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.