Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/202.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android DeepLinkDispatch匹配任何路径_Android_Deep Linking - Fatal编程技术网

Android DeepLinkDispatch匹配任何路径

Android DeepLinkDispatch匹配任何路径,android,deep-linking,Android,Deep Linking,我正在使用AirBnB来处理应用程序中的深层链接,我希望匹配以下深层链接: appscheme://productsSection/some/nested/product/categories/structure appscheme://productsSection/some/nested/product/categories appscheme://productsSection 根据我在文档中看到的内容,我可以配置一个深度链接路径,如: @DeepLink("appscheme://pr

我正在使用AirBnB来处理应用程序中的深层链接,我希望匹配以下深层链接:

appscheme://productsSection/some/nested/product/categories/structure
appscheme://productsSection/some/nested/product/categories
appscheme://productsSection
根据我在文档中看到的内容,我可以配置一个深度链接路径,如:

@DeepLink("appscheme://productsSection")
@DeepLink("appscheme://productsSection/{topCategoryId}")
@DeepLink("appscheme://productsSection/{topCategoryId}/{subCategoryId}")
我的问题是,在编译时我不知道路径嵌套的深度

是否有任何方法可以将库配置为匹配整个嵌套路径而不指定每个段,如
@Deeplink(“appscheme://productsSection/*”
,以便我可以手动处理URI路径并从中构建导航堆栈

如果是这样,类的注释是什么?(我只对匹配深度链接感兴趣,而不是从中提取路径段作为参数)

作为说明,我还使用该库处理到应用程序各个部分的其他深度链接(匹配主要在URI主机和一个或两个路径段上完成),我不想删除该库并手动处理所有深度链接


谢谢大家!

通过代码库查看,该库当前不支持此功能

您可以尝试打开,看看他们是否可以添加对它的支持

在撰写本文时,考虑到您试图实现的内容目前不在库的范围内,直接在
AndroidManifest.xml
中实现该方案,然后从那里开始,不是会容易得多吗

<activity android:name=".MyDeepLinkActivity">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="appscheme" android:host="productsSection" />
    </intent-filter>
</activity>