Tomáš Procházka
05/19/2025, 11:54 PMNavHostController
, I need to override handleDeepLink
with custom implementation.
Basically I need just provide a custom source of deep link intent, it is by default take from activity.
I found no other way how to do it.
NavHostController
and even handleDeepLink
is open so it should be easy to do it.
But sadly it is not, because of rememberNavController()
There is custom logic to create a instance of NavHostController
which I need to reimplement too.
There is this:
private fun createNavController(context: Context) =
NavHostController(context).apply {
navigatorProvider.addNavigator(ComposeNavGraphNavigator(navigatorProvider))
navigatorProvider.addNavigator(ComposeNavigator())
navigatorProvider.addNavigator(DialogNavigator())
}
And sadly ComposeNavGraphNavigator
is internal, so I can't create a own instance and use it.
Nothing else is internal, just this one class.
Why?