What is a deeplink URI for another module? I am tr...
# android
n
What is a deeplink URI for another module? I am trying to deeplink 2 fragments together from different modules and connect them via deeplinks (as I cannot find any other way) and Idk how to structure the URI's. (here is the more detailed question on stackoverflow, ive went through 4,5 projects now and a couple of articles but they're horrible for getting started) This is the example from the article
Copy code
<deepLink app:uri="myApp://fragmentD"/>
What does myApp represent, and how is it structured? By directories, or modules?
j
You can have a navigation module which is implemented by the feature modules
i
Does it matter what your URI is if it is only internal?
n
@Ian Lake But how is the URI formated? @Javier Tried that but still cannot access the ID of the other fragment in the other module
j
you can because the feature module implements the navigation module
the fragment in the navigation module graph is shown in red color because the nav module doesnt implement the feature module, but it works. You can see a similar approach if you see how navigation component works with dynamic feature modules
i
Again, does it matter how the URI is formatted? You can use whatever URI you want, since it only needs to be consistent within your app
URIs are indeed the correct way to navigate between modules that don't have a dependency on one another and the only way to navigate to a destination within another graph (you don't have access to destinations within another graph)
n
@Ian Lake Then I'll use that, but how do i structure my URIs? There is nothing in the docs related to that. I get the idea behind it, but how do I structure my URI to point to my Module A for example? Sorry but I cannot find this info anywhere
i
That's because it doesn't matter. As long as you
navigate(uri
) with the same Uri as your
<deepLink>
, that's enough
n
@Ian Lake Thank you! After some thinkering got it working