Android Chrome 和意图检测

Android Chrome and intents detections

在 Android,有应用的意图,如下所示:

https://developer.android.com/guide/topics/manifest/data-element.html

因此,如果我有 URL 方案 www.google。com/calendar,日历应用程序将被打开,等等

但是,我有疑问 where/when 这种检测会发生吗?我有经验,点击 URL 支持的方案会导致意图识别,如果方案被识别,相关的应用程序将被打开。但是,如果我在 android Chrome 中重定向 (javascript) 到此受支持的 URL,则不会发生识别,因此不会发生重定向。我如何在后台构建 URL(通过点击按钮),重定向到 URL 并打开关联的应用程序?

该功能在 android 中称为 深度链接。根据 document 你可以看到

Open the user's preferred app that can handle the URI, if one is designated.

Open the only available app that can handle the URI.

关于实现你可以参考这个link