[{"data":1,"prerenderedAt":219},["ShallowReactive",2],{"public-settings":3,"post-jetpack-navigation-3-type-safe-deep-links":15,"article-code-bn3des":218},{"site_title":4,"tagline":5,"site_url":6,"footer_text":5,"social_twitter":7,"social_github":7,"social_youtube":7,"social_linkedin":7,"social_mastodon":7,"og_image":8,"comments_enabled":9,"ads_mode":10,"ads_publisher_id":7,"ads_adtest":11,"ads_in_article_enabled":9,"ads_in_article_slot":7,"ads_in_article_paragraph":12,"ads_end_of_post_enabled":9,"ads_end_of_post_slot":7,"ads_feed_enabled":9,"ads_feed_slot":7,"ads_feed_every":13,"ads_sidebar_enabled":9,"ads_sidebar_slot":7,"ads_consent_enabled":11,"seo_enabled":9,"llms_enabled":9,"verification_google":7,"verification_bing":7,"performance_lcp_preload":9,"pwa_enabled":9,"bookmarks_enabled":9,"comments_moderation":9,"home_carousel_featured":9,"home_carousel_latest":9,"home_carousel_latest_mode":14,"home_carousel_series":9,"home_carousel_topics":9},"Android Learner","Practical Android development, explained clearly.","https:\u002F\u002Fwww.androidlearner.com","","\u002Fmedia\u002Fseed\u002Fcover-llm.webp","1","demo","0","2","3","latest",{"post":16,"comments":217},{"id":17,"title":18,"slug":19,"path":20,"excerpt":21,"cover_image":22,"cover_media_id":23,"status":24,"publish_at":25,"reading_time":26,"seo_title":27,"seo_description":28,"og_image":22,"canonical_url":29,"noindex":30,"featured":30,"faq":31,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":39,"series":38,"tags":44,"author":59,"created_at":64,"updated_at":65,"body_md":66,"body_html":67,"related":68},21,"Type-Safe Deep Links in Jetpack Navigation 3","jetpack-navigation-3-type-safe-deep-links","\u002Fposts\u002Fjetpack-navigation-3-type-safe-deep-links","Navigation 3 1.2 turns incoming URIs into typed NavKeys. This tutorial covers intent filters, UriDeepLinkMatcher, custom serializers, and synthetic back stacks.","\u002Fmedia\u002F2026\u002F11\u002F6efbb3f253329bad.webp",60,"published","2026-11-25 01:30:00",6,"Type-safe deep links with Jetpack Navigation 3 1.2","Map URIs to @Serializable NavKeys with UriDeepLinkMatcher, Kotlin Serialization, and DeepLinkSerializer in Navigation 3 1.2.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fjetpack-navigation-3-type-safe-deep-links",false,[32,35],{"question":33,"answer":34},"Does Navigation 3 replace AndroidManifest intent filters?","No. Navigation 3 1.2 matches a DeepLinkRequest after the system has already delivered an Intent to your activity. You still have to declare intent filters for the URIs you handle.",{"question":36,"answer":37},"What happens if a deep link argument has the wrong type?","UriDeepLinkMatcher.match returns null for ordinary parse misses, such as a non-integer value for an Int property, so another matcher can still run. Unsupported key shapes like Map arguments can throw at match time.",null,{"id":40,"name":41,"slug":42,"description":43},4,"Architecture","architecture","App architecture and data layers.",[45,49,51,55],{"id":46,"name":47,"slug":48,"description":38},28,"Android","android",{"id":50,"name":41,"slug":42,"description":38},48,{"id":52,"name":53,"slug":54,"description":38},24,"Jetpack","jetpack",{"id":56,"name":57,"slug":58,"description":38},47,"Navigation","navigation",{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},1,"Super Admin","superadmin","\u002Fu\u002Fsuperadmin","2026-11-24 19:51:50","2026-11-24 19:53:13","Deep links used to mean a lot of stringly-typed arguments: a path pattern in the manifest, a bundle extra, a `toInt()` that might throw, and a back stack that felt wrong when the user arrived in the middle of a flow. Starting in **Navigation 3 version 1.2.0**, Jetpack gives you a type-safe alternative built on `DeepLinkRequest`, `DeepLinkMatcher`, and `kotlinx.serialization`.\n\nThe official documentation, last updated 10 November 2026 for the overview and kept in sync with the November Compose train, is [Support deep links](https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links) and [Match URI deep links](https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\u002Furi-matcher). Android Developers also walked through the design in the Android Developer Summit talk [Building type-safe deep links with Jetpack Navigation 3](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=cgmY14gf4zg). This post turns those pages into a working path you can drop into a Navigation 3 app.\n\nIf you are also upgrading layouts and Material in the same quarter, see [Jetpack Compose 1.13](\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur) and [the Material 3 1.5 migration](\u002Fposts\u002Fmigrate-compose-material-2-to-material-3-1-5). Deep linking is independent of those, but the November documentation refresh landed in the same week.\n\n![Editorial flow from an incoming URI through DeepLinkRequest and UriDeepLinkMatcher to a typed NavKey and back stack.](\u002Fmedia\u002F2026\u002F11\u002Fbe42911def8b2c5c.webp)\n\n## The three official steps\n\nGoogle’s overview is short on purpose:\n\n1. Declare **intent filters** in `AndroidManifest.xml` for the URIs your activity can handle.\n2. Create **`DeepLinkMatcher`** instances that map an incoming request to a navigation key.\n3. In `onCreate` or `onNewIntent`, build a `DeepLinkRequest`, run the matchers, and **update the back stack**.\n\nSkip the manifest and the system will never start your activity. Skip the typed matchers and you are back to parsing `intent.data` by hand. Skip the back-stack step and a user who opens `https:\u002F\u002Fwww.example.com\u002Fusers\u002F42` lands on a profile with no `Home` behind it, so Up or Back exits the app.\n\n## Declare the links you actually own\n\nIntent filters are still platform configuration, not a Navigation 3 DSL. Use the host and path you really serve, and keep `autoVerify` in mind for App Links. The official “Add intent filters for incoming links” guidance still applies here.\n\n```xml\n\u003C!-- AndroidManifest.xml -->\n\u003Cactivity\n    android:name=\".MainActivity\"\n    android:exported=\"true\"\n    android:launchMode=\"singleTop\">\n    \u003Cintent-filter android:autoVerify=\"true\">\n        \u003Caction android:name=\"android.intent.action.VIEW\" \u002F>\n        \u003Ccategory android:name=\"android.intent.category.DEFAULT\" \u002F>\n        \u003Ccategory android:name=\"android.intent.category.BROWSABLE\" \u002F>\n        \u003Cdata\n            android:scheme=\"https\"\n            android:host=\"www.example.com\"\n            android:pathPrefix=\"\u002Fusers\" \u002F>\n    \u003C\u002Fintent-filter>\n\u003C\u002Factivity>\n```\n\n`singleTop` is a common choice so a warm activity receives `onNewIntent` instead of stacking a second task. Match that with the same handling in both `onCreate` and `onNewIntent`.\n\n## Model destinations as serializable keys\n\nA `NavKey` is a typed destination, not a route string. For URI matching, annotate it with `@Serializable` and give each path or query argument a property. `UriDeepLinkMatcher` uses `kotlinx.serialization` to fill those properties from the URI.\n\n```kotlin\n\u002F\u002F UserProfileKey.kt\n@Serializable\ndata class UserProfileKey(val id: Int) : NavKey\n\n@Serializable\ndata class HomeKey(val fromDeepLink: Boolean = false) : NavKey\n```\n\nSupported out of the box, per the URI matcher docs: primitives (`Boolean`, `Int`, `Long`, `Float`, `Double`, `Char`, `Byte`, `Short`) and `String`; enums; `Set`, `List`, or `Array` of those; and nested `@Serializable` classes whose properties flatten into individual placeholders. Optional arguments are ordinary properties with default values. If a required non-nullable property is missing, or `\"abc\"` cannot parse as an `Int`, `match` returns **`null`**. That is a miss, not a crash, so a later matcher can still win.\n\nMaps and nested collections such as `List\u003CList\u003CT>>` are not supported and throw during matching rather than returning null. That is documented as an unsupported configuration, not something to discover in production.\n\n## Match a URI with UriDeepLinkMatcher\n\nCreate a matcher with a `DeepLinkUri` pattern and the serializer for the key. Placeholders in the pattern line up with property names.\n\n```kotlin\n\u002F\u002F DeepLinks.kt\nval userProfilePattern = DeepLinkUri(\"www.example.com\u002Fusers\u002F{id}\")\nval userProfileMatcher = UriDeepLinkMatcher(\n    uriPattern = userProfilePattern,\n    serializer = serializer\u003CUserProfileKey>(),\n).withBackStack { matchResult ->\n    listOf(HomeKey(), matchResult.key)\n}\n\nval request = DeepLinkRequest(uri = \"https:\u002F\u002Fwww.example.com\u002Fusers\u002F123\")\nval key = userProfileMatcher.match(request)?.key\n\u002F\u002F UserProfileKey(id = 123)\n```\n\nThe first snippet is the official getting-started shape; the `withBackStack` wrapper is the documented way to build a synthetic stack so the profile is not a dead-end. On Android, `DeepLinkUri` is a typealias of `android.net.Uri`. The matcher accepts a request built from a string, a `DeepLinkUri`, or — most useful in an activity — an `Intent`.\n\n```kotlin\nval request = DeepLinkRequest(intent = intent)\n```\n\nWhen you construct from an `Intent`, the URI comes from `intent.data`. If they are present, action and MIME type are stored under `DeepLinkRequest.ActionExtrasKey` and `MimeTypeExtrasKey`. Non-null `intent.extras` are saved under `IntentExtrasKey`. You can add your own typed extras by implementing `RequestExtrasKey`.\n\nFor links that do not need arguments, `StaticKeyDeepLinkMatcher` maps a filter (for example an `ACTION_VIEW`) straight onto a key. For schemes the URI matcher does not handle, such as `tel:`, the docs point you at a custom `DeepLinkMatcher`.\n\n## Custom types with DeepLinkSerializer\n\nWhen a single path or query parameter is not a primitive — a packed product id, a `LocalDate`, a comma-separated filter — extend `DeepLinkSerializer\u003CT>`. It is an abstract `KSerializer\u003CT>` that converts between a `String` and your type, and it is compatible with `rememberSerializable` \u002F `rememberNavBackStack`.\n\n```kotlin\n\u002F\u002F ProductSerializer.kt\nobject ProductSerializer : DeepLinkSerializer\u003CProduct>() {\n    override val serialName: String = \"Product\"\n    override fun deserialize(value: String): Product = Product.parse(value)\n    override fun serialize(value: Product): String = value.encode()\n}\n\n@Serializable\ndata class ProductDetailsKey(\n    @Serializable(with = ProductSerializer::class) val product: Product,\n    val quantity: Int,\n) : NavKey\n\nval productMatcher = UriDeepLinkMatcher(\n    uriPattern = DeepLinkUri(\n        \"www.example.com\u002Fproducts?product={product}&quantity={quantity}\",\n    ),\n    serializer = serializer\u003CProductDetailsKey>(),\n)\n```\n\n`quantity` still uses standard serialization. Only the custom object needs the annotation. This is the pattern from the official [DeepLinkSerializer recipe](https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Frecipes\u002Fdeeplinks-serializer) and the API reference examples.\n\nThe design goal, emphasized in the Summit talk, is to **decouple the web URL you may not control** from the typed keys in the app. If marketing changes a query name, you adjust the pattern or the serializer, not every screen that reads a bundle.\n\n## Wire it up in the activity\n\nCollate the matchers, including ones with different key types, as `List\u003CDeepLinkMatcher\u003C*, *>>`. `MatchResult` implements `Comparable`, so `maxOrNull()` picks the best match after you discard nulls. Then build a `List\u003CNavKey>` for `NavDisplay` \u002F `rememberNavBackStack`.\n\n```kotlin\n\u002F\u002F MainActivity.kt\nval deepLinkMatchers: List\u003CDeepLinkMatcher\u003C*, *>> = listOf(\n    StaticKeyDeepLinkMatcher(\n        HomeKey(),\n        listOf(DeepLinkMatcher.actionFilter(Intent.ACTION_VIEW)),\n    ),\n    userProfileMatcher,\n    productMatcher,\n)\n\nclass MainActivity : ComponentActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        val backStack = backStackFor(intent)\n        setContent { App(startBackStack = backStack) }\n    }\n\n    override fun onNewIntent(intent: Intent) {\n        super.onNewIntent(intent)\n        setIntent(intent)\n        \u002F\u002F Replace or push onto the current Navigation 3 back stack\n        \u002F\u002F with the same backStackFor(intent) result.\n    }\n\n    private fun backStackFor(intent: Intent): List\u003CNavKey> {\n        val request = DeepLinkRequest(intent = intent)\n        val matchResult = deepLinkMatchers\n            .mapNotNull { it.match(request) }\n            .maxOrNull()\n        return when (matchResult) {\n            null -> listOf(HomeKey())\n            is BackStackMatchResult\u003C*, *> -> {\n                @Suppress(\"UNCHECKED_CAST\")\n                matchResult.backStack as List\u003CNavKey>\n            }\n            else -> listOf(matchResult.key as NavKey)\n        }\n    }\n}\n```\n\nThat `when` is the official overview sample, cleaned up only enough to compile as a single function. The unchecked cast is also theirs: star-projected matchers erase the key type. Keep the list in one module so a new destination cannot ship a key without a matcher.\n\nTest the misses. A path that does not match should open `HomeKey`, not a half-built profile. A `{id}` that is not an `Int` should fall through. And a successful user URL should show `HomeKey` then `UserProfileKey`, so Back works the way a user who arrived from a browser expects.\n\nIf the deep link opens a screen that then loads local data, the usual offline rules still apply. Our [Room and WorkManager offline-first](\u002Fposts\u002Froom-workmanager-offline-first) notes cover that layer; Navigation 3 will not fetch the user for you.\n\n## FAQ\n\n**Does Navigation 3 replace intent filters?** No. Version 1.2 matches URIs *after* the system has already delivered an `Intent` to your activity. You still declare filters in the manifest.\n\n**What happens when a parameter has the wrong type?** `UriDeepLinkMatcher.match` returns `null`. It does not throw for an ordinary parse miss. Unsupported key shapes, such as `Map` arguments, are a different case and can throw at match time.\n\n**Can I attach extra analytics fields without breaking older links?** Yes. Give those properties default values on the key so older URLs still match.\n\n## Sources\n\n- [Support deep links](https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links), Android Developers, last updated 10 November 2026.\n- [Match URI deep links](https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\u002Furi-matcher).\n- [DeepLinkSerializer recipe](https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Frecipes\u002Fdeeplinks-serializer) and [DeepLinkSerializer API](https:\u002F\u002Fdeveloper.android.com\u002Freference\u002Fkotlin\u002Fandroidx\u002Fnavigation3\u002Fruntime\u002Fdeeplink\u002FDeepLinkSerializer).\n- [What’s new in the Jetpack Compose November ‘26 release](https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fjetpack-compose-november-2026-release) (documentation updates covering Navigation 3 deep links), 18 November 2026.\n- [Build for every screen with the latest Jetpack Compose updates](https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fbuild-for-every-screen-jetpack-compose-updates), 4 November 2026.\n- [Building type-safe deep links with Jetpack Navigation 3](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=cgmY14gf4zg), Android Developer Summit.\n\n*Diagrams are original editorial illustrations for Android Learner, not Google assets.*\n","\u003Cp>Deep links used to mean a lot of stringly-typed arguments: a path pattern in the manifest, a bundle extra, a \u003Ccode>toInt()\u003C\u002Fcode> that might throw, and a back stack that felt wrong when the user arrived in the middle of a flow. Starting in \u003Cstrong>Navigation 3 version 1.2.0\u003C\u002Fstrong>, Jetpack gives you a type-safe alternative built on \u003Ccode>DeepLinkRequest\u003C\u002Fcode>, \u003Ccode>DeepLinkMatcher\u003C\u002Fcode>, and \u003Ccode>kotlinx.serialization\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>The official documentation, last updated 10 November 2026 for the overview and kept in sync with the November Compose train, is \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\">Support deep links\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\u002Furi-matcher\">Match URI deep links\u003C\u002Fa>. Android Developers also walked through the design in the Android Developer Summit talk \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=cgmY14gf4zg\">Building type-safe deep links with Jetpack Navigation 3\u003C\u002Fa>. This post turns those pages into a working path you can drop into a Navigation 3 app.\u003C\u002Fp>\n\u003Cp>If you are also upgrading layouts and Material in the same quarter, see \u003Ca href=\"\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur\">Jetpack Compose 1.13\u003C\u002Fa> and \u003Ca href=\"\u002Fposts\u002Fmigrate-compose-material-2-to-material-3-1-5\">the Material 3 1.5 migration\u003C\u002Fa>. Deep linking is independent of those, but the November documentation refresh landed in the same week.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fmedia\u002F2026\u002F11\u002Fbe42911def8b2c5c.webp\" alt=\"Editorial flow from an incoming URI through DeepLinkRequest and UriDeepLinkMatcher to a typed NavKey and back stack.\" \u002F>\u003C\u002Fp>\n\u003Ch2 id=\"the-three-official-steps\">The three official steps\u003C\u002Fh2>\n\u003Cp>Google’s overview is short on purpose:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Declare \u003Cstrong>intent filters\u003C\u002Fstrong> in \u003Ccode>AndroidManifest.xml\u003C\u002Fcode> for the URIs your activity can handle.\u003C\u002Fli>\n\u003Cli>Create \u003Cstrong>\u003Ccode>DeepLinkMatcher\u003C\u002Fcode>\u003C\u002Fstrong> instances that map an incoming request to a navigation key.\u003C\u002Fli>\n\u003Cli>In \u003Ccode>onCreate\u003C\u002Fcode> or \u003Ccode>onNewIntent\u003C\u002Fcode>, build a \u003Ccode>DeepLinkRequest\u003C\u002Fcode>, run the matchers, and \u003Cstrong>update the back stack\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Skip the manifest and the system will never start your activity. Skip the typed matchers and you are back to parsing \u003Ccode>intent.data\u003C\u002Fcode> by hand. Skip the back-stack step and a user who opens \u003Ccode>https:\u002F\u002Fwww.example.com\u002Fusers\u002F42\u003C\u002Fcode> lands on a profile with no \u003Ccode>Home\u003C\u002Fcode> behind it, so Up or Back exits the app.\u003C\u002Fp>\n\u003Ch2 id=\"declare-the-links-you-actually-own\">Declare the links you actually own\u003C\u002Fh2>\n\u003Cp>Intent filters are still platform configuration, not a Navigation 3 DSL. Use the host and path you really serve, and keep \u003Ccode>autoVerify\u003C\u002Fcode> in mind for App Links. The official “Add intent filters for incoming links” guidance still applies here.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"xml\">\u003Ccode class=\"language-xml\">&lt;!-- AndroidManifest.xml --&gt;\n&lt;activity\n    android:name=&quot;.MainActivity&quot;\n    android:exported=&quot;true&quot;\n    android:launchMode=&quot;singleTop&quot;&gt;\n    &lt;intent-filter android:autoVerify=&quot;true&quot;&gt;\n        &lt;action android:name=&quot;android.intent.action.VIEW&quot; \u002F&gt;\n        &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; \u002F&gt;\n        &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; \u002F&gt;\n        &lt;data\n            android:scheme=&quot;https&quot;\n            android:host=&quot;www.example.com&quot;\n            android:pathPrefix=&quot;\u002Fusers&quot; \u002F&gt;\n    &lt;\u002Fintent-filter&gt;\n&lt;\u002Factivity&gt;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>singleTop\u003C\u002Fcode> is a common choice so a warm activity receives \u003Ccode>onNewIntent\u003C\u002Fcode> instead of stacking a second task. Match that with the same handling in both \u003Ccode>onCreate\u003C\u002Fcode> and \u003Ccode>onNewIntent\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"model-destinations-as-serializable-keys\">Model destinations as serializable keys\u003C\u002Fh2>\n\u003Cp>A \u003Ccode>NavKey\u003C\u002Fcode> is a typed destination, not a route string. For URI matching, annotate it with \u003Ccode>@Serializable\u003C\u002Fcode> and give each path or query argument a property. \u003Ccode>UriDeepLinkMatcher\u003C\u002Fcode> uses \u003Ccode>kotlinx.serialization\u003C\u002Fcode> to fill those properties from the URI.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">\u002F\u002F UserProfileKey.kt\n@Serializable\ndata class UserProfileKey(val id: Int) : NavKey\n\n@Serializable\ndata class HomeKey(val fromDeepLink: Boolean = false) : NavKey\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Supported out of the box, per the URI matcher docs: primitives (\u003Ccode>Boolean\u003C\u002Fcode>, \u003Ccode>Int\u003C\u002Fcode>, \u003Ccode>Long\u003C\u002Fcode>, \u003Ccode>Float\u003C\u002Fcode>, \u003Ccode>Double\u003C\u002Fcode>, \u003Ccode>Char\u003C\u002Fcode>, \u003Ccode>Byte\u003C\u002Fcode>, \u003Ccode>Short\u003C\u002Fcode>) and \u003Ccode>String\u003C\u002Fcode>; enums; \u003Ccode>Set\u003C\u002Fcode>, \u003Ccode>List\u003C\u002Fcode>, or \u003Ccode>Array\u003C\u002Fcode> of those; and nested \u003Ccode>@Serializable\u003C\u002Fcode> classes whose properties flatten into individual placeholders. Optional arguments are ordinary properties with default values. If a required non-nullable property is missing, or \u003Ccode>&quot;abc&quot;\u003C\u002Fcode> cannot parse as an \u003Ccode>Int\u003C\u002Fcode>, \u003Ccode>match\u003C\u002Fcode> returns \u003Cstrong>\u003Ccode>null\u003C\u002Fcode>\u003C\u002Fstrong>. That is a miss, not a crash, so a later matcher can still win.\u003C\u002Fp>\n\u003Cp>Maps and nested collections such as \u003Ccode>List&lt;List&lt;T&gt;&gt;\u003C\u002Fcode> are not supported and throw during matching rather than returning null. That is documented as an unsupported configuration, not something to discover in production.\u003C\u002Fp>\n\u003Ch2 id=\"match-a-uri-with-urideeplinkmatcher\">Match a URI with UriDeepLinkMatcher\u003C\u002Fh2>\n\u003Cp>Create a matcher with a \u003Ccode>DeepLinkUri\u003C\u002Fcode> pattern and the serializer for the key. Placeholders in the pattern line up with property names.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">\u002F\u002F DeepLinks.kt\nval userProfilePattern = DeepLinkUri(&quot;www.example.com\u002Fusers\u002F{id}&quot;)\nval userProfileMatcher = UriDeepLinkMatcher(\n    uriPattern = userProfilePattern,\n    serializer = serializer&lt;UserProfileKey&gt;(),\n).withBackStack { matchResult -&gt;\n    listOf(HomeKey(), matchResult.key)\n}\n\nval request = DeepLinkRequest(uri = &quot;https:\u002F\u002Fwww.example.com\u002Fusers\u002F123&quot;)\nval key = userProfileMatcher.match(request)?.key\n\u002F\u002F UserProfileKey(id = 123)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The first snippet is the official getting-started shape; the \u003Ccode>withBackStack\u003C\u002Fcode> wrapper is the documented way to build a synthetic stack so the profile is not a dead-end. On Android, \u003Ccode>DeepLinkUri\u003C\u002Fcode> is a typealias of \u003Ccode>android.net.Uri\u003C\u002Fcode>. The matcher accepts a request built from a string, a \u003Ccode>DeepLinkUri\u003C\u002Fcode>, or — most useful in an activity — an \u003Ccode>Intent\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">val request = DeepLinkRequest(intent = intent)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>When you construct from an \u003Ccode>Intent\u003C\u002Fcode>, the URI comes from \u003Ccode>intent.data\u003C\u002Fcode>. If they are present, action and MIME type are stored under \u003Ccode>DeepLinkRequest.ActionExtrasKey\u003C\u002Fcode> and \u003Ccode>MimeTypeExtrasKey\u003C\u002Fcode>. Non-null \u003Ccode>intent.extras\u003C\u002Fcode> are saved under \u003Ccode>IntentExtrasKey\u003C\u002Fcode>. You can add your own typed extras by implementing \u003Ccode>RequestExtrasKey\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>For links that do not need arguments, \u003Ccode>StaticKeyDeepLinkMatcher\u003C\u002Fcode> maps a filter (for example an \u003Ccode>ACTION_VIEW\u003C\u002Fcode>) straight onto a key. For schemes the URI matcher does not handle, such as \u003Ccode>tel:\u003C\u002Fcode>, the docs point you at a custom \u003Ccode>DeepLinkMatcher\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"custom-types-with-deeplinkserializer\">Custom types with DeepLinkSerializer\u003C\u002Fh2>\n\u003Cp>When a single path or query parameter is not a primitive — a packed product id, a \u003Ccode>LocalDate\u003C\u002Fcode>, a comma-separated filter — extend \u003Ccode>DeepLinkSerializer&lt;T&gt;\u003C\u002Fcode>. It is an abstract \u003Ccode>KSerializer&lt;T&gt;\u003C\u002Fcode> that converts between a \u003Ccode>String\u003C\u002Fcode> and your type, and it is compatible with \u003Ccode>rememberSerializable\u003C\u002Fcode> \u002F \u003Ccode>rememberNavBackStack\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">\u002F\u002F ProductSerializer.kt\nobject ProductSerializer : DeepLinkSerializer&lt;Product&gt;() {\n    override val serialName: String = &quot;Product&quot;\n    override fun deserialize(value: String): Product = Product.parse(value)\n    override fun serialize(value: Product): String = value.encode()\n}\n\n@Serializable\ndata class ProductDetailsKey(\n    @Serializable(with = ProductSerializer::class) val product: Product,\n    val quantity: Int,\n) : NavKey\n\nval productMatcher = UriDeepLinkMatcher(\n    uriPattern = DeepLinkUri(\n        &quot;www.example.com\u002Fproducts?product={product}&amp;quantity={quantity}&quot;,\n    ),\n    serializer = serializer&lt;ProductDetailsKey&gt;(),\n)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>quantity\u003C\u002Fcode> still uses standard serialization. Only the custom object needs the annotation. This is the pattern from the official \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Frecipes\u002Fdeeplinks-serializer\">DeepLinkSerializer recipe\u003C\u002Fa> and the API reference examples.\u003C\u002Fp>\n\u003Cp>The design goal, emphasized in the Summit talk, is to \u003Cstrong>decouple the web URL you may not control\u003C\u002Fstrong> from the typed keys in the app. If marketing changes a query name, you adjust the pattern or the serializer, not every screen that reads a bundle.\u003C\u002Fp>\n\u003Ch2 id=\"wire-it-up-in-the-activity\">Wire it up in the activity\u003C\u002Fh2>\n\u003Cp>Collate the matchers, including ones with different key types, as \u003Ccode>List&lt;DeepLinkMatcher&lt;*, *&gt;&gt;\u003C\u002Fcode>. \u003Ccode>MatchResult\u003C\u002Fcode> implements \u003Ccode>Comparable\u003C\u002Fcode>, so \u003Ccode>maxOrNull()\u003C\u002Fcode> picks the best match after you discard nulls. Then build a \u003Ccode>List&lt;NavKey&gt;\u003C\u002Fcode> for \u003Ccode>NavDisplay\u003C\u002Fcode> \u002F \u003Ccode>rememberNavBackStack\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"kotlin\">\u003Ccode class=\"language-kotlin\">\u002F\u002F MainActivity.kt\nval deepLinkMatchers: List&lt;DeepLinkMatcher&lt;*, *&gt;&gt; = listOf(\n    StaticKeyDeepLinkMatcher(\n        HomeKey(),\n        listOf(DeepLinkMatcher.actionFilter(Intent.ACTION_VIEW)),\n    ),\n    userProfileMatcher,\n    productMatcher,\n)\n\nclass MainActivity : ComponentActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        val backStack = backStackFor(intent)\n        setContent { App(startBackStack = backStack) }\n    }\n\n    override fun onNewIntent(intent: Intent) {\n        super.onNewIntent(intent)\n        setIntent(intent)\n        \u002F\u002F Replace or push onto the current Navigation 3 back stack\n        \u002F\u002F with the same backStackFor(intent) result.\n    }\n\n    private fun backStackFor(intent: Intent): List&lt;NavKey&gt; {\n        val request = DeepLinkRequest(intent = intent)\n        val matchResult = deepLinkMatchers\n            .mapNotNull { it.match(request) }\n            .maxOrNull()\n        return when (matchResult) {\n            null -&gt; listOf(HomeKey())\n            is BackStackMatchResult&lt;*, *&gt; -&gt; {\n                @Suppress(&quot;UNCHECKED_CAST&quot;)\n                matchResult.backStack as List&lt;NavKey&gt;\n            }\n            else -&gt; listOf(matchResult.key as NavKey)\n        }\n    }\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>That \u003Ccode>when\u003C\u002Fcode> is the official overview sample, cleaned up only enough to compile as a single function. The unchecked cast is also theirs: star-projected matchers erase the key type. Keep the list in one module so a new destination cannot ship a key without a matcher.\u003C\u002Fp>\n\u003Cp>Test the misses. A path that does not match should open \u003Ccode>HomeKey\u003C\u002Fcode>, not a half-built profile. A \u003Ccode>{id}\u003C\u002Fcode> that is not an \u003Ccode>Int\u003C\u002Fcode> should fall through. And a successful user URL should show \u003Ccode>HomeKey\u003C\u002Fcode> then \u003Ccode>UserProfileKey\u003C\u002Fcode>, so Back works the way a user who arrived from a browser expects.\u003C\u002Fp>\n\u003Cp>If the deep link opens a screen that then loads local data, the usual offline rules still apply. Our \u003Ca href=\"\u002Fposts\u002Froom-workmanager-offline-first\">Room and WorkManager offline-first\u003C\u002Fa> notes cover that layer; Navigation 3 will not fetch the user for you.\u003C\u002Fp>\n\u003Ch2 id=\"faq\">FAQ\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Does Navigation 3 replace intent filters?\u003C\u002Fstrong> No. Version 1.2 matches URIs \u003Cem>after\u003C\u002Fem> the system has already delivered an \u003Ccode>Intent\u003C\u002Fcode> to your activity. You still declare filters in the manifest.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>What happens when a parameter has the wrong type?\u003C\u002Fstrong> \u003Ccode>UriDeepLinkMatcher.match\u003C\u002Fcode> returns \u003Ccode>null\u003C\u002Fcode>. It does not throw for an ordinary parse miss. Unsupported key shapes, such as \u003Ccode>Map\u003C\u002Fcode> arguments, are a different case and can throw at match time.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Can I attach extra analytics fields without breaking older links?\u003C\u002Fstrong> Yes. Give those properties default values on the key so older URLs still match.\u003C\u002Fp>\n\u003Ch2 id=\"sources\">Sources\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\">Support deep links\u003C\u002Fa>, Android Developers, last updated 10 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\u002Furi-matcher\">Match URI deep links\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Frecipes\u002Fdeeplinks-serializer\">DeepLinkSerializer recipe\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Freference\u002Fkotlin\u002Fandroidx\u002Fnavigation3\u002Fruntime\u002Fdeeplink\u002FDeepLinkSerializer\">DeepLinkSerializer API\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fjetpack-compose-november-2026-release\">What’s new in the Jetpack Compose November ‘26 release\u003C\u002Fa> (documentation updates covering Navigation 3 deep links), 18 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fbuild-for-every-screen-jetpack-compose-updates\">Build for every screen with the latest Jetpack Compose updates\u003C\u002Fa>, 4 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=cgmY14gf4zg\">Building type-safe deep links with Jetpack Navigation 3\u003C\u002Fa>, Android Developer Summit.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cem>Diagrams are original editorial illustrations for Android Learner, not Google assets.\u003C\u002Fem>\u003C\u002Fp>\n",[69,109,147,183],{"id":70,"title":71,"slug":72,"path":73,"excerpt":74,"cover_image":75,"cover_media_id":76,"status":24,"publish_at":77,"reading_time":78,"seo_title":79,"seo_description":80,"og_image":75,"canonical_url":81,"noindex":30,"featured":30,"faq":82,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":89,"series":38,"tags":94,"author":106,"created_at":107,"updated_at":108},22,"Google Play's 16 KB Page Size Rule: What to Fix Before 1 February 2027","android-16kb-page-size-google-play-deadline","\u002Fposts\u002Fandroid-16kb-page-size-google-play-deadline","Apps that target API 35+ and ship native code must support 16 KB pages before 1 February 2027 or Play will block updates. Pure Kotlin and Java apps are already compatible.","\u002Fmedia\u002F2026\u002F11\u002F723c07ce07ee95c5.webp",62,"2026-11-25 02:00:00",8,"Android 16 KB page size: Play deadline 1 February 2027","If your app targets API 35+ and ships native code, Google Play will block updates after 1 February 2027 unless you support 16 KB pages. How to check, rebuild, and test.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fandroid-16kb-page-size-google-play-deadline",[83,86],{"question":84,"answer":85},"Does a pure Kotlin or Java app need a native rebuild?","No. Android Developers say that if the app and all of its libraries are written only in Java or Kotlin, it already supports 16 KB devices. They still recommend testing on a 16 KB emulator image.",{"question":87,"answer":88},"Will Google remove my app from Play on 1 February 2027 if I miss the deadline?","The official compatibility section says you will not be able to release updates that do not support 16 KB pages. It does not say existing listings are removed. Check Play Console for the wording on your own app, and re-read the page-sizes guide for the current date.",{"id":90,"name":91,"slug":92,"description":93},5,"Performance","performance","Startup, frames, and profiles.",[95,96,100,104],{"id":46,"name":47,"slug":48,"description":38},{"id":97,"name":98,"slug":99,"description":38},49,"Google Play","google-play",{"id":101,"name":102,"slug":103,"description":38},50,"NDK","ndk",{"id":105,"name":91,"slug":92,"description":38},12,{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},"2026-11-24 19:51:51","2026-11-24 19:53:15",{"id":110,"title":111,"slug":112,"path":113,"excerpt":114,"cover_image":115,"cover_media_id":116,"status":24,"publish_at":117,"reading_time":78,"seo_title":118,"seo_description":119,"og_image":115,"canonical_url":120,"noindex":30,"featured":30,"faq":121,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":128,"series":38,"tags":133,"author":144,"created_at":145,"updated_at":146},20,"Material 2 Is Deprecated: Move to Material 3 1.5 and TextFieldState","migrate-compose-material-2-to-material-3-1-5","\u002Fposts\u002Fmigrate-compose-material-2-to-material-3-1-5","Material 3 1.5.0 is stable and Material 2 is no longer actively maintained. This guide covers the theme swap, component move, and TextFieldState migration.","\u002Fmedia\u002F2026\u002F11\u002Faf355ed5e362f80d.webp",57,"2026-11-25 01:00:00","Migrate from Compose Material 2 to Material 3 1.5","Compose Material 2 is no longer maintained. Adopt Material 3 1.5.0 and replace deprecated value-based TextField APIs with TextFieldState.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fmigrate-compose-material-2-to-material-3-1-5",[122,125],{"question":123,"answer":124},"Is Material 2 removed from the Compose BOM?","No. It is deprecated and no longer actively maintained, but existing Material 2 screens still compile. Plan the migration if you want ongoing bug fixes and the current design language.",{"question":126,"answer":127},"Are Material 3 value-based TextField overloads deprecated in 1.5.0?","No. Android Developers say those Material 3 overloads are not deprecated yet in 1.5.0, but they already recommend the state-based TextField and OutlinedTextField APIs. Value-based BasicTextField and Material 2 TextField are deprecated in Compose 1.13.",{"id":129,"name":130,"slug":131,"description":132},2,"Jetpack Compose","jetpack-compose","Modern Android UI.",[134,135,138,140],{"id":46,"name":47,"slug":48,"description":38},{"id":40,"name":136,"slug":137,"description":38},"Compose","compose",{"id":139,"name":130,"slug":131,"description":38},18,{"id":141,"name":142,"slug":143,"description":38},46,"Material 3","material-3",{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},"2026-11-24 19:51:49","2026-11-24 19:53:11",{"id":148,"title":149,"slug":150,"path":151,"excerpt":152,"cover_image":153,"cover_media_id":154,"status":24,"publish_at":155,"reading_time":156,"seo_title":157,"seo_description":158,"og_image":153,"canonical_url":159,"noindex":30,"featured":30,"faq":160,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":167,"series":38,"tags":168,"author":180,"created_at":181,"updated_at":182},19,"What's New in Jetpack Compose 1.13 (November 2026)","jetpack-compose-1-13-flexbox-grid-progressive-blur","\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur","Compose 1.13 is stable in BOM 2026.11.01. Here is how to upgrade, when to use FlexBox and Grid, and what progressive blur and the new deprecations actually mean.","\u002Fmedia\u002F2026\u002F11\u002F6fab1724acc6e8e3.webp",54,"2026-11-25 00:30:00",7,"Jetpack Compose 1.13: FlexBox, Grid, and Progressive Blur","Upgrade to Compose BOM 2026.11.01. Stable FlexBox and Grid, progressive blur, PolygonShape, and the Kotlin 2.2 \u002F compileSdk 37.1 requirements.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur",[161,164],{"question":162,"answer":163},"Do I need Kotlin 2.2 to use Compose 1.13?","Yes. The official 18 November 2026 Compose release post requires Kotlin 2.2 or newer and compileSdk 37.1 when you upgrade to Compose BOM 2026.11.01.",{"question":165,"answer":166},"Should I replace FlowRow and FlowColumn immediately?","Not necessarily. Android Developers say FlexBox supersedes the Flow layouts and recommend FlexBox for new code. Existing Flow call sites still compile; move them when you next touch those screens.",{"id":129,"name":130,"slug":131,"description":132},[169,170,171,175,179],{"id":46,"name":47,"slug":48,"description":38},{"id":40,"name":136,"slug":137,"description":38},{"id":172,"name":173,"slug":174,"description":38},44,"FlexBox","flexbox",{"id":176,"name":177,"slug":178,"description":38},45,"Grid","grid",{"id":139,"name":130,"slug":131,"description":38},{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},"2026-11-24 19:51:47","2026-11-24 19:53:09",{"id":139,"title":184,"slug":185,"path":186,"excerpt":187,"cover_image":188,"cover_media_id":172,"status":24,"publish_at":189,"reading_time":190,"seo_title":191,"seo_description":192,"og_image":188,"canonical_url":193,"noindex":30,"featured":30,"faq":194,"howto":38,"review_note":38,"submitted_at":38,"reviewed_at":38,"category":195,"series":38,"tags":199,"author":215,"created_at":216,"updated_at":216},"Can You Play GTA 6 on Android? Official Platforms, Remote Play, and Fake APKs","can-you-play-gta-6-on-android","\u002Fposts\u002Fcan-you-play-gta-6-on-android","As of 24 November 2026, GTA 6 is not a native Android game. Here is what Rockstar actually released, how official Remote Play works, and how to spot unofficial APK offers.","\u002Fmedia\u002F2026\u002F11\u002F7e0bf4b732de8bdb.webp","2026-11-24 06:00:00",11,"Can You Play GTA 6 on Android? Official Facts (Nov 2026)","GTA 6 launched 19 Nov 2026 on PS5 and Xbox Series X|S only. This guide covers official Remote Play, what cloud posts actually say, and how to avoid unofficial APK downloads.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fcan-you-play-gta-6-on-android",[],{"id":26,"name":196,"slug":197,"description":198},"Android Development","android-development","Tutorials and guides imported from the original Android Learner blog.",[200,201,204,208,212],{"id":46,"name":47,"slug":48,"description":38},{"id":202,"name":203,"slug":203,"description":38},40,"gaming",{"id":205,"name":206,"slug":207,"description":38},41,"GTA 6","gta-6",{"id":209,"name":210,"slug":211,"description":38},42,"Remote Play","remote-play",{"id":213,"name":214,"slug":214,"description":38},43,"security",{"id":60,"name":61,"username":62,"avatar":38,"profile_path":63},"2026-11-24 06:24:53",[],"\u003Cp>Deep links used to mean a lot of stringly-typed arguments: a path pattern in the manifest, a bundle extra, a \u003Ccode>toInt()\u003C\u002Fcode> that might throw, and a back stack that felt wrong when the user arrived in the middle of a flow. Starting in \u003Cstrong>Navigation 3 version 1.2.0\u003C\u002Fstrong>, Jetpack gives you a type-safe alternative built on \u003Ccode>DeepLinkRequest\u003C\u002Fcode>, \u003Ccode>DeepLinkMatcher\u003C\u002Fcode>, and \u003Ccode>kotlinx.serialization\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>The official documentation, last updated 10 November 2026 for the overview and kept in sync with the November Compose train, is \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\">Support deep links\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\u002Furi-matcher\">Match URI deep links\u003C\u002Fa>. Android Developers also walked through the design in the Android Developer Summit talk \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=cgmY14gf4zg\">Building type-safe deep links with Jetpack Navigation 3\u003C\u002Fa>. This post turns those pages into a working path you can drop into a Navigation 3 app.\u003C\u002Fp>\n\u003Cp>If you are also upgrading layouts and Material in the same quarter, see \u003Ca href=\"\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur\">Jetpack Compose 1.13\u003C\u002Fa> and \u003Ca href=\"\u002Fposts\u002Fmigrate-compose-material-2-to-material-3-1-5\">the Material 3 1.5 migration\u003C\u002Fa>. Deep linking is independent of those, but the November documentation refresh landed in the same week.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fmedia\u002F2026\u002F11\u002Fbe42911def8b2c5c.webp\" alt=\"Editorial flow from an incoming URI through DeepLinkRequest and UriDeepLinkMatcher to a typed NavKey and back stack.\" \u002F>\u003C\u002Fp>\n\u003Ch2 id=\"the-three-official-steps\">The three official steps\u003C\u002Fh2>\n\u003Cp>Google’s overview is short on purpose:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Declare \u003Cstrong>intent filters\u003C\u002Fstrong> in \u003Ccode>AndroidManifest.xml\u003C\u002Fcode> for the URIs your activity can handle.\u003C\u002Fli>\n\u003Cli>Create \u003Cstrong>\u003Ccode>DeepLinkMatcher\u003C\u002Fcode>\u003C\u002Fstrong> instances that map an incoming request to a navigation key.\u003C\u002Fli>\n\u003Cli>In \u003Ccode>onCreate\u003C\u002Fcode> or \u003Ccode>onNewIntent\u003C\u002Fcode>, build a \u003Ccode>DeepLinkRequest\u003C\u002Fcode>, run the matchers, and \u003Cstrong>update the back stack\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Skip the manifest and the system will never start your activity. Skip the typed matchers and you are back to parsing \u003Ccode>intent.data\u003C\u002Fcode> by hand. Skip the back-stack step and a user who opens \u003Ccode>https:\u002F\u002Fwww.example.com\u002Fusers\u002F42\u003C\u002Fcode> lands on a profile with no \u003Ccode>Home\u003C\u002Fcode> behind it, so Up or Back exits the app.\u003C\u002Fp>\n\u003Ch2 id=\"declare-the-links-you-actually-own\">Declare the links you actually own\u003C\u002Fh2>\n\u003Cp>Intent filters are still platform configuration, not a Navigation 3 DSL. Use the host and path you really serve, and keep \u003Ccode>autoVerify\u003C\u002Fcode> in mind for App Links. The official “Add intent filters for incoming links” guidance still applies here.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"xml\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">xml\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">&#x3C;!-- AndroidManifest.xml -->\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#85E89D\">activity\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    android:name\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\".MainActivity\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    android:exported\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"true\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    android:launchMode\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"singleTop\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    &#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#85E89D\">intent-filter\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> android:autoVerify\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"true\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        &#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#85E89D\">action\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> android:name\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"android.intent.action.VIEW\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> \u002F>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        &#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#85E89D\">category\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> android:name\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"android.intent.category.DEFAULT\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> \u002F>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        &#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#85E89D\">category\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> android:name\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"android.intent.category.BROWSABLE\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> \u002F>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        &#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#85E89D\">data\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">            android:scheme\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"https\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">            android:host\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"www.example.com\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">            android:pathPrefix\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"\u002Fusers\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> \u002F>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    &#x3C;\u002F\u003C\u002Fspan>\u003Cspan style=\"color:#85E89D\">intent-filter\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">&#x3C;\u002F\u003C\u002Fspan>\u003Cspan style=\"color:#85E89D\">activity\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>singleTop\u003C\u002Fcode> is a common choice so a warm activity receives \u003Ccode>onNewIntent\u003C\u002Fcode> instead of stacking a second task. Match that with the same handling in both \u003Ccode>onCreate\u003C\u002Fcode> and \u003Ccode>onNewIntent\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"model-destinations-as-serializable-keys\">Model destinations as serializable keys\u003C\u002Fh2>\n\u003Cp>A \u003Ccode>NavKey\u003C\u002Fcode> is a typed destination, not a route string. For URI matching, annotate it with \u003Ccode>@Serializable\u003C\u002Fcode> and give each path or query argument a property. \u003Ccode>UriDeepLinkMatcher\u003C\u002Fcode> uses \u003Ccode>kotlinx.serialization\u003C\u002Fcode> to fill those properties from the URI.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F UserProfileKey.kt\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">@Serializable\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">data\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> class\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> UserProfileKey\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> id: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Int\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) : \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">NavKey\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">@Serializable\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">data\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> class\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> HomeKey\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> fromDeepLink: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Boolean\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#79B8FF\"> false\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) : \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">NavKey\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>Supported out of the box, per the URI matcher docs: primitives (\u003Ccode>Boolean\u003C\u002Fcode>, \u003Ccode>Int\u003C\u002Fcode>, \u003Ccode>Long\u003C\u002Fcode>, \u003Ccode>Float\u003C\u002Fcode>, \u003Ccode>Double\u003C\u002Fcode>, \u003Ccode>Char\u003C\u002Fcode>, \u003Ccode>Byte\u003C\u002Fcode>, \u003Ccode>Short\u003C\u002Fcode>) and \u003Ccode>String\u003C\u002Fcode>; enums; \u003Ccode>Set\u003C\u002Fcode>, \u003Ccode>List\u003C\u002Fcode>, or \u003Ccode>Array\u003C\u002Fcode> of those; and nested \u003Ccode>@Serializable\u003C\u002Fcode> classes whose properties flatten into individual placeholders. Optional arguments are ordinary properties with default values. If a required non-nullable property is missing, or \u003Ccode>&quot;abc&quot;\u003C\u002Fcode> cannot parse as an \u003Ccode>Int\u003C\u002Fcode>, \u003Ccode>match\u003C\u002Fcode> returns \u003Cstrong>\u003Ccode>null\u003C\u002Fcode>\u003C\u002Fstrong>. That is a miss, not a crash, so a later matcher can still win.\u003C\u002Fp>\n\u003Cp>Maps and nested collections such as \u003Ccode>List&lt;List&lt;T&gt;&gt;\u003C\u002Fcode> are not supported and throw during matching rather than returning null. That is documented as an unsupported configuration, not something to discover in production.\u003C\u002Fp>\n\u003Ch2 id=\"match-a-uri-with-urideeplinkmatcher\">Match a URI with UriDeepLinkMatcher\u003C\u002Fh2>\n\u003Cp>Create a matcher with a \u003Ccode>DeepLinkUri\u003C\u002Fcode> pattern and the serializer for the key. Placeholders in the pattern line up with property names.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F DeepLinks.kt\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> userProfilePattern \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> DeepLinkUri\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"www.example.com\u002Fusers\u002F{id}\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> userProfileMatcher \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> UriDeepLinkMatcher\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    uriPattern \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> userProfilePattern,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    serializer \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> serializer\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">UserProfileKey\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">>(),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">).\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">withBackStack\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> { matchResult \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">->\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    listOf\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">HomeKey\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(), matchResult.key)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> request \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> DeepLinkRequest\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(uri \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"https:\u002F\u002Fwww.example.com\u002Fusers\u002F123\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> key \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> userProfileMatcher.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">match\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(request)?.key\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F UserProfileKey(id = 123)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>The first snippet is the official getting-started shape; the \u003Ccode>withBackStack\u003C\u002Fcode> wrapper is the documented way to build a synthetic stack so the profile is not a dead-end. On Android, \u003Ccode>DeepLinkUri\u003C\u002Fcode> is a typealias of \u003Ccode>android.net.Uri\u003C\u002Fcode>. The matcher accepts a request built from a string, a \u003Ccode>DeepLinkUri\u003C\u002Fcode>, or — most useful in an activity — an \u003Ccode>Intent\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> request \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> DeepLinkRequest\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(intent \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> intent)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>When you construct from an \u003Ccode>Intent\u003C\u002Fcode>, the URI comes from \u003Ccode>intent.data\u003C\u002Fcode>. If they are present, action and MIME type are stored under \u003Ccode>DeepLinkRequest.ActionExtrasKey\u003C\u002Fcode> and \u003Ccode>MimeTypeExtrasKey\u003C\u002Fcode>. Non-null \u003Ccode>intent.extras\u003C\u002Fcode> are saved under \u003Ccode>IntentExtrasKey\u003C\u002Fcode>. You can add your own typed extras by implementing \u003Ccode>RequestExtrasKey\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>For links that do not need arguments, \u003Ccode>StaticKeyDeepLinkMatcher\u003C\u002Fcode> maps a filter (for example an \u003Ccode>ACTION_VIEW\u003C\u002Fcode>) straight onto a key. For schemes the URI matcher does not handle, such as \u003Ccode>tel:\u003C\u002Fcode>, the docs point you at a custom \u003Ccode>DeepLinkMatcher\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"custom-types-with-deeplinkserializer\">Custom types with DeepLinkSerializer\u003C\u002Fh2>\n\u003Cp>When a single path or query parameter is not a primitive — a packed product id, a \u003Ccode>LocalDate\u003C\u002Fcode>, a comma-separated filter — extend \u003Ccode>DeepLinkSerializer&lt;T&gt;\u003C\u002Fcode>. It is an abstract \u003Ccode>KSerializer&lt;T&gt;\u003C\u002Fcode> that converts between a \u003Ccode>String\u003C\u002Fcode> and your type, and it is compatible with \u003Ccode>rememberSerializable\u003C\u002Fcode> \u002F \u003Ccode>rememberNavBackStack\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F ProductSerializer.kt\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">object\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> ProductSerializer\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> : \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">DeepLinkSerializer\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Product\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">>() {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    override\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> serialName: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">String\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\"> \"Product\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    override\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> deserialize\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">value\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">String\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">): \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Product\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> Product.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">parse\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">value\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    override\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> serialize\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">value\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Product\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">): \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">String\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> value\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">encode\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">@Serializable\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">data\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> class\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> ProductDetailsKey\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    @Serializable\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(with \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> ProductSerializer::\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">class\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> product: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Product\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> quantity: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Int\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">) : \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">NavKey\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> productMatcher \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> UriDeepLinkMatcher\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    uriPattern \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> DeepLinkUri\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#9ECBFF\">        \"www.example.com\u002Fproducts?product={product}&#x26;quantity={quantity}\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    ),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    serializer \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> serializer\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">ProductDetailsKey\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">>(),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>quantity\u003C\u002Fcode> still uses standard serialization. Only the custom object needs the annotation. This is the pattern from the official \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Frecipes\u002Fdeeplinks-serializer\">DeepLinkSerializer recipe\u003C\u002Fa> and the API reference examples.\u003C\u002Fp>\n\u003Cp>The design goal, emphasized in the Summit talk, is to \u003Cstrong>decouple the web URL you may not control\u003C\u002Fstrong> from the typed keys in the app. If marketing changes a query name, you adjust the pattern or the serializer, not every screen that reads a bundle.\u003C\u002Fp>\n\u003Ch2 id=\"wire-it-up-in-the-activity\">Wire it up in the activity\u003C\u002Fh2>\n\u003Cp>Collate the matchers, including ones with different key types, as \u003Ccode>List&lt;DeepLinkMatcher&lt;*, *&gt;&gt;\u003C\u002Fcode>. \u003Ccode>MatchResult\u003C\u002Fcode> implements \u003Ccode>Comparable\u003C\u002Fcode>, so \u003Ccode>maxOrNull()\u003C\u002Fcode> picks the best match after you discard nulls. Then build a \u003Ccode>List&lt;NavKey&gt;\u003C\u002Fcode> for \u003Ccode>NavDisplay\u003C\u002Fcode> \u002F \u003Ccode>rememberNavBackStack\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"kotlin\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">kotlin\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">\u002F\u002F MainActivity.kt\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> deepLinkMatchers: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">List\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">DeepLinkMatcher\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">&#x3C;*, *>> \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> listOf\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">    StaticKeyDeepLinkMatcher\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">        HomeKey\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">        listOf\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(DeepLinkMatcher.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">actionFilter\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.ACTION_VIEW)),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    ),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    userProfileMatcher,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    productMatcher,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">class\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> MainActivity\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> : \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">ComponentActivity\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">() {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    override\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> onCreate\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(savedInstanceState: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Bundle\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">?) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">        super\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">onCreate\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(savedInstanceState)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> backStack \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> backStackFor\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(intent)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">        setContent\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> { \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">App\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(startBackStack \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> backStack) }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    override\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> onNewIntent\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(intent: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Intent\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">        super\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">onNewIntent\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(intent)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">        setIntent\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(intent)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">        \u002F\u002F Replace or push onto the current Navigation 3 back stack\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">        \u002F\u002F with the same backStackFor(intent) result.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">    private\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> fun\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> backStackFor\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(intent: \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">Intent\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">): \u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">List\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">NavKey\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> request \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> DeepLinkRequest\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(intent \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> intent)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        val\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> matchResult \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> deepLinkMatchers\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            .\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">mapNotNull\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> { it.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">match\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(request) }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            .\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">maxOrNull\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">        return\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> when\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (matchResult) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">            null\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> ->\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> listOf\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">HomeKey\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">())\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            is\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> BackStackMatchResult\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">&#x3C;*\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">*>\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> ->\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">                @Suppress\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"UNCHECKED_CAST\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">                matchResult.backStack \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">as\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> List\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">NavKey\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">            }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">            else\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> ->\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> listOf\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(matchResult.key \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">as\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> NavKey)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">        }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>That \u003Ccode>when\u003C\u002Fcode> is the official overview sample, cleaned up only enough to compile as a single function. The unchecked cast is also theirs: star-projected matchers erase the key type. Keep the list in one module so a new destination cannot ship a key without a matcher.\u003C\u002Fp>\n\u003Cp>Test the misses. A path that does not match should open \u003Ccode>HomeKey\u003C\u002Fcode>, not a half-built profile. A \u003Ccode>{id}\u003C\u002Fcode> that is not an \u003Ccode>Int\u003C\u002Fcode> should fall through. And a successful user URL should show \u003Ccode>HomeKey\u003C\u002Fcode> then \u003Ccode>UserProfileKey\u003C\u002Fcode>, so Back works the way a user who arrived from a browser expects.\u003C\u002Fp>\n\u003Cp>If the deep link opens a screen that then loads local data, the usual offline rules still apply. Our \u003Ca href=\"\u002Fposts\u002Froom-workmanager-offline-first\">Room and WorkManager offline-first\u003C\u002Fa> notes cover that layer; Navigation 3 will not fetch the user for you.\u003C\u002Fp>\n\u003Ch2 id=\"faq\">FAQ\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Does Navigation 3 replace intent filters?\u003C\u002Fstrong> No. Version 1.2 matches URIs \u003Cem>after\u003C\u002Fem> the system has already delivered an \u003Ccode>Intent\u003C\u002Fcode> to your activity. You still declare filters in the manifest.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>What happens when a parameter has the wrong type?\u003C\u002Fstrong> \u003Ccode>UriDeepLinkMatcher.match\u003C\u002Fcode> returns \u003Ccode>null\u003C\u002Fcode>. It does not throw for an ordinary parse miss. Unsupported key shapes, such as \u003Ccode>Map\u003C\u002Fcode> arguments, are a different case and can throw at match time.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Can I attach extra analytics fields without breaking older links?\u003C\u002Fstrong> Yes. Give those properties default values on the key so older URLs still match.\u003C\u002Fp>\n\u003Ch2 id=\"sources\">Sources\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\">Support deep links\u003C\u002Fa>, Android Developers, last updated 10 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Fdeep-links\u002Furi-matcher\">Match URI deep links\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fguide\u002Fnavigation\u002Fnavigation-3\u002Frecipes\u002Fdeeplinks-serializer\">DeepLinkSerializer recipe\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Freference\u002Fkotlin\u002Fandroidx\u002Fnavigation3\u002Fruntime\u002Fdeeplink\u002FDeepLinkSerializer\">DeepLinkSerializer API\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fjetpack-compose-november-2026-release\">What’s new in the Jetpack Compose November ‘26 release\u003C\u002Fa> (documentation updates covering Navigation 3 deep links), 18 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdeveloper.android.com\u002Fblog\u002Fposts\u002Fbuild-for-every-screen-jetpack-compose-updates\">Build for every screen with the latest Jetpack Compose updates\u003C\u002Fa>, 4 November 2026.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=cgmY14gf4zg\">Building type-safe deep links with Jetpack Navigation 3\u003C\u002Fa>, Android Developer Summit.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cem>Diagrams are original editorial illustrations for Android Learner, not Google assets.\u003C\u002Fem>\u003C\u002Fp>\n",1795550404298]