【问题标题】:How to open developer page on Google Play Store (market://)如何在 Google Play 商店 (market://) 上打开开发者页面
【发布时间】:2015-08-15 21:14:07
【问题描述】:

最近,Google Play 允许开发者创建开发者页面。

示例如下:https://play.google.com/store/apps/dev?id=5700313618786177705

我试图找到我可以使用的开发者页面 Uri 链接 (market://...),但我在 Android 开发者页面上找不到它。 (http://developer.android.com/distribute/tools/promote/linking.html)

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://..."));
startActivity(intent);

【问题讨论】:

  • 我为您的问题添加了正确的解决方案。 (market://dev?id=5700313618786177705) 没有打开 Playstore 应用。

标签: android google-play


【解决方案1】:

这对我有用:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/dev?id=7809285959465313029")));

使用市场 URI 对我不起作用。

【讨论】:

    【解决方案2】:

    您可以简单地调用 market://dev?id=xxx 例如:

    market://dev?id=5700313618786177705
    

    希望这能满足您的需求!

    最好, 杰克

    【讨论】:

    • 谢谢,它有效! @Rayes,将其作为 setData(Uri) 放入 Intent 时有效
    • @Rayes:工作原理如下:startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://dev?id=5700313618786177705")))
    • 这对我不起作用。使用完整的 https url 有效。
    • 这不起作用,它只会崩溃。我对此投了反对票!!!我不明白为什么这个答案被接受。提问者是否首先对其进行了测试?使用常规链接“https”有效
    【解决方案3】:
    //Method for intent to Google playstore developer page
    
     private void M_Intent2developerpage() {
           Intent intentdev = new Intent(Intent.ACTION_VIEW);
           intentdev.setData(Uri.parse("market://search?q=pub:Google Inc."));
       //here Developer Name is very case-sensitive . change your developer name as shown in developers page.
           if (!MyStartActivity(intentdev)) {
               intentdev.setData(Uri.parse("https://play.google.com/store/apps/dev?id=5700313618786177705"));
               if (!MyStartActivity(intentdev)) {
                   Toast.makeText(this, "Could not open Android Google PlayStore, please install the Google play app.", Toast.LENGTH_SHORT).show();
               }
           }
       }
    
    
    //Method checks if any problem when Intent
    
     public boolean MyStartActivity(Intent aIntent) {
            try {
                startActivity(aIntent);
                return true;
            } catch (ActivityNotFoundException e) {
                return false;
            }
        }
    

    【讨论】:

      【解决方案4】:

      使用开发者名称而不是开发者 ID 的 Kotlin:

      startActivity(Intent(Intent.ACTION_VIEW,
           Uri.parse("https://play.google.com/store/apps/developer?id=MyDeveloperName")))
      

      【讨论】:

        【解决方案5】:

        要在 google play 上打开应用程序:您可以使用:

        getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/dev?id=<developer_id>)));
        

        getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://dev?id=<developer_id>)));
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2019-02-26
          • 2019-09-06
          相关资源
          最近更新 更多