【问题标题】:Is there a way to direct the user to the market for another app?有没有办法将用户引导到另一个应用程序的市场?
【发布时间】:2011-05-19 08:45:02
【问题描述】:

我想将用户从当前正在运行的一个应用程序引导到市场,以下载另一个应用程序。

【问题讨论】:

标签: android google-play


【解决方案1】:

市场链接是:market://search?q=pname:your.package.name

在您的代码中使用它:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.android.example"));
startActivity(intent);

来自:http://developer.android.com/guide/publishing/publishing.html#marketintent

【讨论】:

    【解决方案2】:

    是的。试试这个:

    Intent intent = new Intent(Intent.ACTION_VIEW,
        Uri.parse("https://market.android.com/details?id=com.hg.cyberlords")); 
    
    c.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
    c.startActivity(intent); 
    

    这将使用“Cyber​​lords”应用打开市场应用。

    【讨论】:

      猜你喜欢
      • 2011-01-15
      • 1970-01-01
      • 2021-11-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-15
      相关资源
      最近更新 更多