Android navigation
Map DeferredLink onto Navigation Compose.
LIVE SPECIMEN
Universal & Deferred Link SimulatorURL
https://taqlyn.com/shop/checkout?cartId=cart_9841&promo=WELCOME20&aff=partner_8Optional: com.taqlyn.nav:navigation2 (or navigation3). Map path / params to a route, navigate once per linkId, then consume.
val navigator = Nav2DeepLinkNavigator(
navControllerProvider = { navController },
routeMapper = { link ->
val sku = link.params["sku"] ?: return@Nav2DeepLinkNavigator null
"product/$sku"
},
)
SdkCore.observeLinks().onEach { link ->
val navLink = link.toNav()
if (navigator.navigate(navLink)) {
SdkCore.consume(link.linkId)
}
}.launchIn(scope)A second navigate with the same linkId returns false. If Compose Navigation already handles https, set linkProcessingMode = DEFERRED_ONLY.