打开 Playstore 并根据自定义链接返回应用程序

发布于 2025-01-11 14:59:55 字数 1014 浏览 1 评论 0原文

我遇到了一个看起来很熟悉但用例不同的问题。 我有一个应用程序,其中有一个如下所示的网址 https://www.myWebLink.com/referral-id/xxx 其中 xxx 可以是任何用户 ID

注意: 此网址是一个可共享的网址,任何用户都可以共享该网址,并具有自己的用户 ID,因此当下一个用户打开链接时,它将显示共享用户的用户 ID URL。

我想要做的是,当用户在 URL 上共享并单击它时,有 2 种可能性,应用程序已安装或未安装,并且还有 2 个操作。

1 - 如果安装了应用程序,它将打开该应用程序并在字段中填充用户 ID。 (这一点效果很好,我已经通过深层链接处理了)

2 - 如果应用程序未安装,它应该登陆到googleplay,一旦用户安装了应用程序,它应该登陆回带有用户ID的应用程序填充到字段中。

对于第二点,我可以将用户重定向到googleplay,因为我使用了“firebase动态链接”,但我面临的唯一问题是,我有在动态链接模板中定义 URL,但就我而言,URL 完全取决于用户(因为它具有唯一的用户 ID)。

在此处输入图像描述

所以我的问题是如何实现第二个一旦用户从 googleplay 安装应用程序,它就会返回到填充了用户 ID 的应用程序。

提前致谢。

I have a problem that looks familiar but with a different use case.
I have an application in which I have a url like below
https://www.myWebLink.com/referral-id/xxx
where xxx can by any user ID.

Note: This url is a sharable url, which is shared by any user, with it's own USER ID, so when a next user opens link, it will display USER ID of the user who shared URL.

All I want to do is when user shares above URL and it's clicked, there are 2 possibilities, either application is already installed or not and there are 2 actions as well.

1 - If application is installed, it opens the application and user ID is populated in the field. (This point is working well, i have handled it through deeplinks)

2 - If application is not installed, it should land to googleplay and once user installs the application, it should land back to application with user ID populated into the field.

For second point I am able to redirect user to googleplay, for that I have used "firebase dynamic links" but the only problem I am facing is, I have to define URLs in dynamic link template, but for my case a URL totally depends on the user (as it has unique USER ID).

enter image description here

So my question would be how can I achieve the second part where once user installs the application from googleplay, it lands back to application with user ID populated.

Thank in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文