作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我使用此代码将用户重定向到 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/
我是一名优秀的程序员,十分优秀!