gpt4 book ai didi

android - 如何将用户重定向到 Market 中的开发者页面?

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:33:36 26 4
gpt4 key购买 nike

我使用此代码将用户重定向到 Market 中的特定应用:

Uri marketUri = Uri.parse("market://details?id=" + packageName);
Intent marketIntent = new Intent(Intent.ACTION_VIEW, marketUri);
startActivity(marketIntent);

如何将用户重定向到 Market 中的开发者页面?
我尝试将链接从浏览器复制到 Uri

Uri marketUri = Uri.parse("market://developer?id=Developer+Name");

真实姓名已更改
这会导致致命异常

E/AndroidRuntime(29775): android.content.ActivityNotFoundException: No Activity found to handle Intent

我可以用

Uri marketUri = Uri.parse("https://play.google.com/store/apps/developer?id=Developer+Name");

但会出现应用程序选择对话框(Play Market 或 Browser)。我想默认使用市场。

谢谢。

最佳答案

正确的查询是:

 market://search?q=pub:\"IncrediApp\"

关于你的错误:

This causes Fatal exception

这是因为您可能在未安装 Google Play 应用的模拟器或设备上运行它。

but application selection dialog appears (Play Market or Browser). I want to use the market by default.

如果您使用 market://前缀,它将成为默认前缀。对于 https://play.google.com它根据用户的设置工作,并会询问用户是否没有定义默认值。

关于android - 如何将用户重定向到 Market 中的开发者页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10672029/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com