【问题标题】:How to open developer promo page in Play Store using Intent?如何使用 Intent 在 Play 商店中打开开发者促销页面?
【发布时间】:2015-10-02 08:55:46
【问题描述】:

有这样的链接(开发者促销页面):

https://play.google.com/store/apps/dev?id=6599001017670379452

可以使用

打开
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(uri)));

但我找不到方法如何直接在 Play 商店中打开它,而不要求用户在浏览器和 Play 商店应用程序之间进行选择。

此解决方案不适用它会打开搜索结果:

market://search?q=pub:<publisher_name>

【问题讨论】:

    标签: android android-intent


    【解决方案1】:

    试试这个代码:

    Intent intent = getPackageManager().getLaunchIntentForPackage("com.android.vending");
    if (intent != null) {
        intent.setAction(Intent.ACTION_VIEW);
        intent.setData(Uri.parse("https://play.google.com/store/apps/dev?id=6599001017670379452"));
        startActivity(intent);
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-23
      相关资源
      最近更新 更多