3

有没有办法在 Kindle Fire 上启动一个 Intent,这会导致 AppStore 应用程序打开并显示某个开发人员的所有应用程序?例如,在安装了 Android Market 的手机/平板电脑上,我可以这样做:

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

并在 Android Market 中显示我的所有应用。我可以通过亚马逊应用商店做到这一点吗?如果是这样,怎么做?我已经用其他看似有效的名称(例如“ZeptoLab”)尝试了该 Intent,但没有得到任何过滤。它只是让我进入完全未经过滤的 App Store。使用“market://details?id=package.name”查找特定应用似乎确实有效。

4

5 回答 5

19

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

为了营销目的指向您的应用程序,请使用 URL http://www.amazon.com/gp/mas/dl/android?p=packagename(其中 packagename 是您的应用程序包名称)。

如果您想链接到 Amazon Appstore 上所有应用程序的列表,请使用 URL http://www.amazon.com/gp/mas/dl/android?p=packagename&showAll=1

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

所有这些都可以在这里看到:https ://developer.amazon.com/sdk/in-app-purchasing/sample-code/deeplink.html

更新(深度链接):

amzn://apps/android?p=
于 2011-11-23T19:50:47.700 回答
3

最好的方法是查看他们的网站(或此处),目前声明如下:

于 2015-04-14T21:05:58.070 回答
2

这是我使用 chiuki 的以下建议提出的解决方案:

我在我的一个资源文件中添加了一个布尔值,指示该应用程序是在 Amazon AppStore 还是在 Android Market 中发布。是的,每当你发布你的应用程序时,你都必须更改它,但想想它有点像在发布时记得将 debuggable 设置为“false”。把它放在检查清单上。它是这样的:

在资源文件中:

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

在代码中:

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 */} 
}
于 2011-11-29T03:05:02.230 回答
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...

于 2012-12-24T21:47:48.500 回答
2

亚马逊现在支持他们自己的深度链接:https ://developer.amazon.com/appsandservices/apis/earn/in-app-purchasing/docs/deeplink

例如,您可以使用 uri 开始一个意图amzn://apps/android?p=my.package.name

于 2014-08-16T11:29:39.887 回答