gpt4 book ai didi

android - 没有为深层链接捕获 Chrome 自定义选项卡中的重定向

转载 作者:行者123 更新时间:2023-12-04 23:49:03 25 4
gpt4 key购买 nike

我想捕获发生在 Chrome 自定义选项卡中的重定向,以确保用户停留在 native 移动应用程序中。
以下是 Chrome 自定义选项卡的启动方式:

val url = "https://demo.company.com/sso/oidc/start/?idp_connection_id=Username-Password-Authentication&status_response_url=https://member.example.com/urgent"
val builder = CustomTabsIntent.Builder()
val customTabsIntent = builder.build()
customTabsIntent.launchUrl(this, Uri.parse(url))
该网页重定向到作为 status_response_url 给出的 URL。用户认证后的参数。移动应用注册适当的方案:
 <intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="member.example.com"
android:scheme="https" />
</intent-filter>
不幸的是,系统似乎没有捕获重定向。为什么?

最佳答案

由于缺少 user gesture,这是 App Links 和 SSO 的一个众所周知的问题。 .
您正在使用 preferred Claimed HTTPS Schemes option但是需要一个插页式网页才能使其可靠地工作。
我的 blog post对此有更多信息,包括您可以运行以查看 UX 的代码示例。

关于android - 没有为深层链接捕获 Chrome 自定义选项卡中的重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69936806/

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