【问题标题】:How to redirect to my play store app listing in Android如何在 Android 中重定向到我的 Play 商店应用列表
【发布时间】:2014-10-06 06:51:49
【问题描述】:

我正在开发一个应用程序,其中我添加了一个名为“更多应用程序”的按钮,我想要的是当用户单击该按钮时,它应该重定向到显示我帐户的应用程序列表的 Play 商店。 我做了以下代码:

String url_more_app = "https://play.google.com/store/search?q=rajesh%20panchal&hl=en";  
case R.id.btn_more_app:

  Intent viewIntent =
  new Intent("android.intent.action.VIEW",
  Uri.parse(url_more_app ));
  startActivity(viewIntent);

break;  

但是当点击该按钮时,它会显示我的应用程序以及其他人的应用程序的应用程序列表, 我怎样才能只显示我的应用程序??

【问题讨论】:

    标签: android redirect url-redirection google-play


    【解决方案1】:

    更改网址

    String url_more_app = "https://play.google.com/store/search?q=rajesh%20panchal&hl=en";  
    

    https://play.google.com/store/apps/developer?id=Rajesh+Panchal
    

    【讨论】:

      【解决方案2】:

      看看这个

      final String appPackageName = "com.example"; // Can also use getPackageName(), as below
      
      startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
      

      Google Doc

      【讨论】:

        【解决方案3】:

        启动 Google Play 商店可与某些市场 URI 配合使用:

        String market_uri = "https://play.google.com/store/search?q=pub:maven&hl=en";  
        
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse(<market_uri>));
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NO_ANIMATION);
        startActivity(intent);
        

        uris 可以在哪里

        • market://details?id=
        • market://search?q=pub:

        点赞mine

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-05-27
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多