# android/nav3-recipes: Jetpack Navigation 3 Recipes for Android Apps

> android/nav3-recipes is a Kotlin sample repository for implementing common Jetpack Navigation 3 patterns, including deep links, scenes, animations, back stacks, conditional navigation, and modular architectures. It is intended as a reference for Android developers working with the library's latest API, while stable versions are available through releases.

**android/nav3-recipes** — Implement common use cases with Jetpack Navigation 3

- Repository: https://github.com/android/nav3-recipes
- Website: https://developer.android.com/guide/navigation/navigation-3
- Stars: 1,398 · Forks: 154
- Language: Kotlin
- License: Apache-2.0
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/android-nav3-recipes

## What android/nav3-recipes Covers

android/nav3-recipes is not the Navigation 3 library itself. It is a collection of recipes for using Jetpack Navigation 3 APIs in Android applications. The README describes each recipe as introducing a single concept, with the intent that new concepts receive separate examples instead of expanding existing recipes. That structure makes the repository useful when a developer needs to understand one navigation problem at a time, rather than inspect a large application that mixes several unrelated patterns.

The repository is written primarily in Kotlin and targets Android navigation work built around Jetpack Navigation 3. Its examples cover the basic API, saveable and Parcelable back stacks, entry providers, lifecycle access, deep links, scenes, animations, multiple back stacks, conditional flows, dependency injection, dynamic features, and ViewModels. The breadth is useful for teams evaluating Navigation 3 because the same repository shows how several related concerns interact with the library.

The README distinguishes between the main branch and releases. Recipes on main use the latest Navigation 3 version, which may be an alpha or snapshot. Recipes that use stable versions are available from the releases page. This distinction matters for adoption. A developer looking for an experimental API pattern can inspect main, but a team selecting a version for an application should first determine whether the example is intended to demonstrate current APIs or a release-qualified implementation.

## Navigation 3 Mechanisms and Data Flow

The recipes are organized around navigation keys, routes, scenes, back stacks, and entry content. The basic examples establish the smallest use of the API, while the saveable and Parcelable variants add persistence concerns. The multiple-back-stacks example goes further by modeling several top-level routes, retaining state for each route, and displaying them through a navigation bar. According to the README, that navigation state survives configuration changes and process death.

Deep-link handling has several distinct patterns. `UriDeepLinkMatcher` is used for a static Uri and for a Uri containing arguments. `DeepLinkMatcher.withBackStack` supports links between applications with a synthetic back stack and the expected Up behavior. Other examples use a custom `DeepLinkMatcher` to parse `DeepLinkRequest` extras, a custom `DeepLinkSerializer` for URI keys with non-primitive arguments, composite filters through `DeepLinkMatcher.Filter` with `and` and `or`, and `DeepLinkKey` to associate URI patterns directly with navigation keys.

Scenes are treated as a separate navigation concern. The built-in Dialog example uses a dialog scene. Custom examples create a bottom sheet destination, a list-detail layout with `Scene` and `SceneStrategy`, and a two-pane layout. Material3 Adaptive Navigation3 examples cover list-detail and supporting-pane layouts. Scene decorators can add presentation behavior such as dialogs, top app bars, navigation bars, or rails.

Animation examples override defaults globally or for one destination. Conditional transitions select slide directions based on the initial and target navigation keys. Conditional navigation switches to a different flow when a condition holds, with authentication and first-time-user onboarding given as examples. This is a collection of composable patterns rather than one prescribed app structure.

## Installing android/nav3-recipes and Starting a First Use

The repository includes Gradle wrapper files, `gradlew` and `gradlew.bat`, at the top level. The README does not document a complete installation or first-build tutorial, so there is no verified clone command, Android Studio setup sequence, or Gradle task to reproduce here. The documented way to obtain the project is its repository and release page. The README directs developers who need stable-version recipes to the releases page.

A first inspection can start with the Basic recipe at `app/src/main/java/com/example/nav3recipes/basic`. That directory is explicitly identified as showing the most basic API usage. From there, the deep-link directories provide a narrower path for URI handling, while `app/src/main/java/com/example/nav3recipes/multiplestacks` demonstrates the higher-level structure of several retained back stacks. The repository's directory layout is therefore the first-use map, but it does not claim that these paths are standalone examples independent of the repository build.

The top-level repository entries also show that the project is a Gradle-based Android repository with `app/`, `common/`, `dynamicfeature/`, `metroapp/`, and `syntheticbackstackapp/` modules or directories. The `settings.gradle.kts` and `build.gradle.kts` files indicate that navigation is part of a broader build configuration. The README excerpt does not state the required Android Studio version, JDK version, Android SDK level, or the exact task used to open the project. Those details must be confirmed from the build files or Android tooling before attempting a local build.

## Deep Links, Scenes, and Back-Stack Trade-offs

The repository makes the trade-offs in Navigation 3 visible through separate recipes, but it does not present one universal solution. A static `Uri` can use `UriDeepLinkMatcher`, while URI arguments require a different example. Non-primitive arguments require a custom `DeepLinkSerializer`, which adds serialization and parsing decisions beyond primitive matching. A custom `DeepLinkMatcher` is also appropriate when `DeepLinkRequest` extras carry application-specific data.

Synthetic back stacks are a distinct concern from ordinary deep-link matching. The synthetic-back-stack recipe uses `DeepLinkMatcher.withBackStack` to support navigation between apps and correct Up behavior. A developer copying only the URI matcher pattern may omit the history that makes Up navigation behave as expected. The same caution applies to saveable and Parcelable back stacks. These are separate examples, not interchangeable snippets.

Scene selection introduces another boundary. A dialog and a bottom sheet are presentation patterns, while list-detail and two-pane layouts model larger adaptive structures. Material3 Adaptive Navigation3 supplies layouts for list-detail and supporting-pane scenes, but the README routes bug reports for those scenes to a separate issue tracker. That division of ownership indicates that recipe code and Material scene implementation are related but not identical maintenance surfaces.

The repository also documents conditional flows and modular navigation. Hilt, Koin, and Metro examples address dependency injection in separate modules. The Dynamic Feature Module example addresses integration with optional features. These examples can prevent navigation code from becoming tightly coupled to one app module, but the README does not claim that every dependency injection framework has identical behavior. The appropriate recipe depends on the app's existing architecture.

## Maintenance, Releases, and Apache-2.0 Use

The repository is not archived, and the last push was on 2026-10-15. Its recent releases include `1.0.0` on 2025-11-19 and `1.1.0` on 2026-05-06. The README says that main tracks the latest Navigation 3 version, which may be an alpha or snapshot, while stable recipes are available through releases. That makes release selection an engineering decision rather than a minor version label. Main can expose newer APIs sooner, but it can also carry changing behavior or incomplete stabilization.

The project is licensed under Apache-2.0. That license includes permissions and conditions that are relevant when copying or adapting example code, but this repository description is not legal advice. Teams should review the repository's `LICENSE` file and their own compliance process before redistributing modified examples.

The README's stated direction is that patterns seen in recipes may later become optional helpers in Navigation 3 itself, after which the recipe is updated to use that helper. This creates a maintenance consideration: a recipe is not necessarily permanent API documentation. Developers should compare the recipe against the Navigation 3 version used by their application, and should treat release pages as the more appropriate source when stable behavior is required.

The repository is not archived, but its main-branch dependency policy is intentionally moving. Upgrade planning should therefore account for changes in Navigation 3, not just changes in the sample application.

## Conclusion

Adopt this repository when you need a focused Kotlin reference for Jetpack Navigation 3 patterns, especially deep links, adaptive scenes, multiple back stacks, or conditional flows. Do not treat it as a complete application template or as a source of stable main-branch dependencies. Verify first which Navigation 3 version your build uses, whether a recipe matches your required back-stack behavior, and whether the main branch is appropriate for production planning.

## FAQ

### What is android/nav3-recipes used for?

It is a Kotlin recipe repository for implementing common use cases with Jetpack Navigation 3. The examples cover basic navigation, deep links, scenes, animations, back stacks, conditional navigation, architecture, and related Android concerns.

### Does the main branch use a stable Navigation 3 version?

The README states that recipes on main use the latest Navigation 3 version, which may be an alpha or snapshot. It directs developers who need stable versions to the releases page.

### Which android/nav3-recipes example demonstrates multiple back stacks?

The `multipleplestacks` recipe creates multiple top-level routes with separate back stacks. It retains state for each route and persists navigation state across configuration changes and process death.

## Sources

- [android/nav3-recipes on GitHub](https://github.com/android/nav3-recipes)
- [License: Apache-2.0](https://github.com/android/nav3-recipes/blob/main/LICENSE)
- [Project website](https://developer.android.com/guide/navigation/navigation-3)
- [README](https://github.com/android/nav3-recipes/blob/main/README.md)
- [Releases](https://github.com/android/nav3-recipes/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/android-nav3-recipes
