Reputation: 3669
I'm using AirBnB's DeepLinkDispatch for handling deep links in an application and I want to match deep links like:
appscheme://productsSection/some/nested/product/categories/structure
appscheme://productsSection/some/nested/product/categories
appscheme://productsSection
From what I've seen in the the documentation I can configure a deep link path like:
@DeepLink("appscheme://productsSection")
@DeepLink("appscheme://productsSection/{topCategoryId}")
@DeepLink("appscheme://productsSection/{topCategoryId}/{subCategoryId}")
My problem is that I don't know at compile time how deep the path is nested.
Is there any way to configure the library to match an entire nested path without specifying each segment, like @Deeplink("appscheme://productsSection/*")
, so that I can manually process the URI path and build my navigation stack from it?
If so, what would the annotation for a class be? (I'm only interested in matching the deep links, not extracting path segments as parameters from them)
As a note I also use the library to process other deep links to various parts of the app (matching is done mostly on URI host and one or two path segments) and I would like not to remove the library and process all deep links by hand.
Thank you!
Upvotes: 1
Views: 799
Reputation: 560
From looking through the codebase, this feature is not currently supported by the library.
You can try opening an issue to see if they can add support for it.
At the time of writing, given that what you're trying to achieve is currently outside the scope of the library, wouldn't it be much easier to implement the scheme directly inside the AndroidManifest.xml
yourself and then go from there?
<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>
You can read more about how to set it up here.
Upvotes: 1