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

julioromano

02/18/2021, 6:37 PM
Is it possible to create deep link pending intents with
navigation-compose
? Previously I was using
NavDeepLinkBuilder
but I can’t seem to get it work with compose.
1
i

Ian Lake

02/18/2021, 7:00 PM
You can certainly build your pending intent from an implicit intent (i.e.,
Intent(Intent.ACTION_VIEW, "<example://myapp/deeplink/$id>".toUri())
) that matches a deep link you add to your destination
Note that you'll need to either 1) set the component name to your activity as part of building your Intent or 2) add the proper intent-filter to match your deep link
j

julioromano

02/18/2021, 7:16 PM
Cool thanks, assuming case 1): Can I use as “data” uri the same exact
route
string i set in:
Copy code
composable(route = "myRoute/{myArgument}") {
    // Composable...
}
?
i

Ian Lake

02/18/2021, 7:23 PM
2 Views