https://kotlinlang.org logo
#compose
Title
# compose
f

Florian Walther (live streaming)

12/28/2021, 2:37 PM
My deep links are not navigating to the destination when I use
launchMode=singletTop
. I implemented deep links following the documentation. Do deep links not handle
onNewIntent
?
I found the solution in the docs of the old navigation library: https://developer.android.com/guide/navigation/navigation-deep-link#handle
I think this should be mentioned in the Compose Navigation documentation
i

Ian Lake

01/04/2022, 10:59 PM
As per those docs, don't use
singleTop
. It doesn't actually do anything for this case and you should always use the default launchMode
f

Florian Walther (live streaming)

01/05/2022, 11:04 AM
Ok got it
But what if you don't want to allow the same activity on the stack multiple times?
i

Ian Lake

01/05/2022, 6:28 PM
That won't happen when Navigation handles deep links anyways since it always enforces the correct activity stack as well
f

Florian Walther (live streaming)

01/06/2022, 11:37 AM
Yes I noticed that. But there are other situations where a 2nd activity could be created, right?
i

Ian Lake

01/06/2022, 4:58 PM
Like I said, when handling a deep link, Navigation enforces the correct activity stack, so you'll always have the correct set of activities
f

Florian Walther (live streaming)

01/07/2022, 10:33 AM
What I mean is, do we really never want
launchMode=singleTop
in our app ever?