Android 如何直接从Google Play商店下载

Android 如何直接从Google Play商店下载,android,google-play,Android,Google Play,在特定应用程序上打开Google Play store非常简单,可以使用 startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=MyApp"))); 这将打开Play Store,但用户仍需单击下载链接。是否可以告诉Play Store其目的不是查看应用程序,而是下载应用程序?如果Play Store仍然要求用户确认,这没关系,但我只想跳过再次向用户显示整个应用程序的部分——他已经知道他想要的东西

在特定应用程序上打开Google Play store非常简单,可以使用

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=MyApp")));

这将打开Play Store,但用户仍需单击下载链接。是否可以告诉Play Store其目的不是查看应用程序,而是下载应用程序?如果Play Store仍然要求用户确认,这没关系,但我只想跳过再次向用户显示整个应用程序的部分——他已经知道他想要的东西。

我从下面的链接中找到了这段代码

这是在play sotre上打开应用程序的代码

          try {
                startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=appname")));
            } catch (android.content.ActivityNotFoundException anfe) {
                startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=appname")));
            }
jost在Uri中使用“rdid”:


谢谢Meenal,很遗憾,我无法为该产品使用不受支持的解决方案。尽管如此,它仍然提供了很多信息。@JacobusR,这意味着这是不可行的。
try {
        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=appname&rdid=appname")));
    } catch (android.content.ActivityNotFoundException anfe) {
        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=appname&rdid=appname")));
    }