android - 如果安装了应用程序,则使用带有谷歌播放链接的深度链接打开应用程序,否则打开商店
问题描述
假设我在商店中有我的应用程序的链接,如下所示:https ://play.google.com/store/apps/details?id=my.app.id
假设如果我的应用已安装,我想打开它,或者如果我的应用未安装,则让商店处理链接。
说我intent-filter
这样说:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="play.google.com"
android:path="/store/apps/details?id=my.app.id" />
</intent-filter>
快乐的情况是:
我的应用程序已安装。链接与路径匹配。然后打开应用
我的应用程序没有安装。唯一的处理程序是商店,因此商店被打开
但。据我所知,链接的查询部分(“?”之后的部分)将不起作用。所以上面的代码无法解析到我的应用程序。因此,商店处理该链接。
如果我改为android:path="/store/apps/details
,它仍然无法工作,因为感觉商店处理所有 play.google.com 链接
无论如何我可以让它工作吗?感谢您的时间
解决方案
检查这个文档。这将是工作。 https://firebase.google.com/docs/dynamic-links
推荐阅读
- r - 如何解释单细胞 RNA seq 数据差异基因表达中的两个协变量?
- php - 如何解决“进程已通过信号 11 发出信号” - Snappy 库?
- python - 在缺少日期的多索引数据框中移动列
- c - How pthread_exit() and pthread_cancel() calls cleanup routine in Linux?
- android - 对于 .APK 和 .AAB 的基于 URL 的共享,有哪些好的替代方案?
- python - Django 的 ManyToManyField 模型列未显示在数据库中
- discord.js - 有没有办法列出特定角色的所有成员?
- google-bigquery - 使用 bigquery 中的 java 代码执行更新操作时发生异常
- android - 离子 http 失败(响应 0)
- git - GitKraken - 无法从 www.gitlab.com 重定向到 gitlab.com