Search code examples
androidkotlinandroid-navigationandroid-deep-link

retrieving deep link on destination in Android Navigation Component


is there any way to get deep-link that has been used to navigate to a destination? in addOnDestinationChangedListener method on navController there exists a NavDestination object, but I was not abled to get the deep-link.


Solution

  • there is something we can do. this line of code can give us the deeplink:

    arguments[KEY_DEEP_LINK_INTENT]