I'm looking at `Nav3 deeplinks`<https://github.com...
# compose
u
I'm looking at `Nav3 deeplinks`https://github.com/android/nav3-recipes/blob/main/docs/deeplink-guide.md and what I don't see, is what to do if activityis already running.
Activity.onCreate
doesn't called.. `onNewIntent`will get called. How do I then turn that into a deeplink that compose will consume?
t
How we do it is we hook into both: the activity has a
val deeplink: MutableState<Uri>?
field, and we have a top-level
App
composable that takes a
deeplink: State<Uri?>
parameter. We also clear that value with an
onDeeplinkHandled
callback, so we can avoid sending users to the same destination twice.
u
do you somehow replace the default navkey when creating the backstack if deeplink is present? or do you always set you default and then overwrite it with deeplink?