意图过滤器中的路径模式与“#!”不匹配
pathpattern in intent-filter doesn't match '#!'
我如何在 intent-filter 中过滤此 URl 以在点击它时打开应用程序:
https://www.host.com/something#!something
由于@ianhanniballake 在此post:
Intent filter pathPrefix with '#' not working
我不能用'!'过滤它像这样:
<data
android:host="www.host.com"
android:pathPattern=".*!.*"
android:scheme="https" />
有什么想法吗?
#
不是 URL 路径的一部分。它是路径和片段之间的分隔符(a.k.a., the fragment identifier)。因此,您无法在 pathPattern
中对其进行过滤。无法过滤 <data>
元素中的片段。您需要过滤其余部分。
我如何在 intent-filter 中过滤此 URl 以在点击它时打开应用程序: https://www.host.com/something#!something
由于@ianhanniballake 在此post: Intent filter pathPrefix with '#' not working
我不能用'!'过滤它像这样:
<data
android:host="www.host.com"
android:pathPattern=".*!.*"
android:scheme="https" />
有什么想法吗?
#
不是 URL 路径的一部分。它是路径和片段之间的分隔符(a.k.a., the fragment identifier)。因此,您无法在 pathPattern
中对其进行过滤。无法过滤 <data>
元素中的片段。您需要过滤其余部分。