【问题标题】:How to open exactly Play Store with deep link?如何使用深层链接准确打开 Play 商店?
【发布时间】:2019-11-27 17:06:53
【问题描述】:
部分用户安装了默认处理Google Play链接的第三方应用商店。
我的应用仅在 Play 上发布。
通常我会这样做:
intent://details?id=X&url=Y&referrer=Z#Intent;scheme=market;action=android.intent.action.VIEW;package=com.android.vending;end";
如果未安装应用,是否可以专门打开 Google Play?
【问题讨论】:
标签:
android
google-play
deep-linking
【解决方案1】:
使用以下参考代码(替换为您的应用网址)
protected void startPlayStoreActivity() {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.hardik.passkey"));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}