Handle Uris with no host and params (e.g 'airbnb://')
Not sure if it's a bug or on purpose but DeepLinkDispatch does not handle Uris with just the base scheme, like airbnb://. In that case, DeepLinkUri.parse() with return ParseResult.INVALID_HOST. Not sure if we should handle it, any other thoughts?
Our initial thought was that we'd only accept valid URIs for deep links. If you need a catch-all you can still use the BroadcastReceiver. If you can present a legit reason to allow partial URIs maybe we can consider, otherwise I'd prefer not.
I kinda see a use case for this after debating about it with @ysdong. The problem is that we'd have to skip the DeepLinkURI.parse() call in this case. I'll think about it for a bit
I don't think there is a nice way to accept this pattern without modifying DeepLinkUri. Other alternatives would be to skip the parse() for that specific case but I don't believe that it's should be the DeepLinkEntry's responsibility to support that.
We use deep links for a custom scheme without a host, just a scheme and a filepath.
E.g.
custom-scheme://basket custom-scheme://hotel/1234 custom-scheme://item?itemId=65
In this situation, the links are never used outside of deep linking into the app and so host is unnecessary, so we decided to exclude it.
@andrewlord1990 Sorry to bring an old issue up, but I'm kinda confused here. I've understood that is not possible to have partial schemes, but you said you excluded 'it' and I guess it solved your problem. How did you solve that ? And is this ever going to be supported out-of-the-box ?
Thanks and nice job here guys !
you can't have a URI path and not a host. You're just misinterpreting it. In the examples @andrewlord1990 gave, basket, hotel and item would be the host, respectively.
@felipecsl Thanks for the feedback, I think I got the idea, but in my app we use just like @andrewlord1990 said. Is there any milestone for that ?
Thanks
@leonardo2204 those URLs should work fine with DeepLinkDispatch. Have you tried it and it didnt' work?
Hey @felipecsl, just to clarify, using like: bla:///campaigns/{bla} or bla:///test/another will it work ?
Thanks again
@leonardo2204 yep, that works fine
Any workarounds how to handle this in DeepLinkDispatch in case the old app was already supporting app:// and it's not possible to change it at the moment?