自定义标签:深层链接不会返回到应用程序

时间:2019-02-21 13:14:38

标签: android

我正在使用“自定义”选项卡进行单点登录,但是遇到一个问题,即单击“自定义”选项卡中的深层链接按钮无法打开应用程序。相反,它只是在“自定义”标签内打开它。仅当将Chrome设置为默认浏览器时,才会出现此问题;当我使用Firefox自定义标签时,也会发生这种情况。现在使用com.android.support:customtabs:28.0.0。

html测试页上按钮的代码:

<a href="https://<domain>/login/openapp" style="font-size: 52px;">Click me</a>

AndroidManifest中的声明:

        <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:scheme="https" android:host="<domain>" android:pathPrefix="/login/openapp" />
        </intent-filter>

我发现使用自定义方案代替https可以很好地工作,但是我们特别想使用https进行验证,因此应用程序会自动打开,而无需Android询问要使用哪个应用程序。测试网站不包含验证文件,因此Android应该回过头来询问要使用哪个应用程序。

深层链接本身可以正常工作,因为从自定义标签中选择“在Chrome中打开”,然后单击按钮即可正常工作:Android询问使用哪个应用程序打开深层链接。

我有什么想念的吗?我已经检查了StackOverflow上的其他问题,但它们与自定义标签页活动没有停止有关,这不是我当前看到的问题。

p.s。在https://github.com/saschpe/android-customtabs

的帮助下,我们的应用程序通过处理自定义标签的本机插件在Unity中制作

0 个答案:

没有答案
相关问题