Shahryar Khosravi
01/20/2025, 3:14 PMStylianos Gakis
01/20/2025, 4:06 PMadb shell am start -a android.intent.action.VIEW -d "your.link.here"
In order to test your deep link without whatever influence you think your browser has.
If it does not work like this either, then it's a different issue.Shahryar Khosravi
01/20/2025, 4:50 PMStylianos Gakis
01/20/2025, 4:53 PMShahryar Khosravi
01/20/2025, 4:54 PMShahryar Khosravi
01/20/2025, 5:24 PMStylianos Gakis
01/20/2025, 9:52 PMIan Lake
01/21/2025, 3:53 AMIt is strongly recommended to always use the default launchMode of standard when using Navigation. When using standard launch mode, Navigation automatically handles deep links by calling handleDeepLink() to process any explicit or implicit deep links within the Intent. However, this does not happen automatically if the Activity is re-used when using an alternate launchMode such as singleTop. In this case, it is necessary to manually call handleDeepLink() in onNewIntent(),
Shahryar Khosravi
01/22/2025, 8:19 AMdorche
01/23/2025, 9:40 AMShahryar Khosravi
01/23/2025, 2:37 PMStylianos Gakis
01/23/2025, 3:37 PMdorche
01/23/2025, 4:26 PMdorche
01/23/2025, 4:29 PMsingleTop
launchMode in these cases and then handle the incoming deep-link.
I'm just saying that I don't agree with the documentation and that it's misleading for one of the most common use cases for deep-links.Stylianos Gakis
01/23/2025, 4:30 PMdorche
01/23/2025, 4:32 PMstandard
you'd get a new activity which at the very least is very ugly UX (and some other caveats like that)Stylianos Gakis
01/23/2025, 5:23 PMdorche
01/23/2025, 5:44 PMdorche
01/23/2025, 5:58 PMnavController.navigate(intent.data)
or
navController.handleDeepLink(intent)
From either onNewIntent
or via your own listener with addOnNewIntentListener
Stylianos Gakis
01/23/2025, 8:36 PMdorche
01/23/2025, 9:57 PMShahryar Khosravi
01/24/2025, 8:54 PMval bottomSheetNavigator = rememberBottomSheetNavigator()
val navController = rememberNavController(bottomSheetNavigator)
ModalBottomSheetLayout(bottomSheetNavigator) {
NavHost(
navController = navController,
...
) {}
Stylianos Gakis
01/24/2025, 11:05 PMIan Lake
01/25/2025, 1:07 AMLocalActivity.current as OnNewIntentProvider
(which always succeeds if you are in a ComponentActivity
) along with DisposableEffect
to call `addOnNewIntentListener`/`removeOnNewIntentListener` - that way your composable gets the callback directly rather than having to write any code in your activity at allColton Idle
02/20/2025, 2:22 AM