Skip to content
OpenSmartRoute
Skillv1.0.0

navigation-3

Learn how to install and migrate to Jetpack Navigation 3, and how to implement features and patterns such as deep links, multiple backstacks, scenes (dialogs, bottom sheets, list-detail, two-pane, sup

by android(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from android/skills (navigation/navigation-3/SKILL.md) via skills.sh. Install upstream with npx skills add android/skills --skill navigation-3. Copyright stays with the author (Complete terms in LICENSE.txt).


Migration guide

  • Navigation 2 to Navigation 3 migration guide: Step-by-step guide to migrate an Android application from Navigation 2 to Navigation 3, covering dependency updates, route changes, state management, and UI component replacements.

Requirements

Developer documentation

  • Navigation 3. Search documentation for more information on basics, saving and managing navigation state, modularizing navigation code, creating custom layouts using Scenes, animating between destinations, or applying logic or wrappers to destinations.

Recipes

Code examples showcasing common patterns.

Basic API usage

Common UI

  • Common UI: Demonstrates how to implement a common navigation UI pattern with a bottom navigation bar and multiple back stacks, where each tab in the navigation bar has its own navigation history.

Deep links

Scenes

Use built-in Scenes

  • Dialog: Shows how to create a Dialog.

Create custom Scenes

  • BottomSheet: Shows how to create a BottomSheet destination.
  • List-Detail Scene: Demonstrates how to implement adaptive list-detail layouts using the Navigation 3 Scenes API.
  • Two pane Scene: Demonstrates how to implement adaptive two-pane layouts using the Navigation 3 Scenes API.

Material Adaptive

  • Material List-Detail: Demonstrates how to implement an adaptive list-detail layout using Material 3 Adaptive.
  • Material Supporting Pane: Demonstrates how to implement an adaptive supporting pane layout using Material 3 Adaptive.

Animations

  • Animations: Shows how to override the default animations for all destinations and a single destination.
  • Conditional Transitions: Shows how to implement conditional transition animations.

Common back stack behavior

  • Multiple back stacks: Shows how to create multiple top level routes, each with its own back stack. Top level routes are displayed in a navigation bar allowing users to switch between them. State is retained for each top level route, and the navigation state persists config changes and process death.

Conditional navigation

  • Conditional navigation: Switch to a different navigation flow when a condition is met. For example, for authentication or first-time user onboarding.

Lifecycle

Architecture

Working with ViewModel

Passing navigation arguments

  • Basic ViewModel : Navigation arguments are passed to a ViewModel constructed using viewModel()

Returning results

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/android-skills-navigation-3/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

android-skills-navigation-3.ocm.jsonjson
{
  "ocm": "1",
  "id": "android-skills-navigation-3",
  "kind": "skill",
  "name": "navigation-3",
  "description": "Learn how to install and migrate to Jetpack Navigation 3, and how to implement features and patterns such as deep links, multiple backstacks, scenes (dialogs, bottom sheets, list-detail, two-pane, supporting pane), conditional navigation (such as logged-in navigation versus anonymous), returning results from flows, integration with Hilt, ViewModel, Kotlin, and view interoperability.",
  "publisher": "android",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "recipe",
      "android",
      "navigation-2",
      "navigation-3",
      "migration",
      "compose",
      "guide",
      "dependencies",
      "navkey"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Learn how to install and migrate to Jetpack Navigation 3, and how to implement features and patterns such as deep links, multiple backstacks, scenes (dialogs, bottom sheets, list-detail, two-pane, supporting pane), conditional navigation (such as logged-in navigation versus anonymous), returning results from flows, integration with Hilt, ViewModel, Kotlin, and view interoperability."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/android/skills",
      "path": "navigation/navigation-3/SKILL.md",
      "ref": "HEAD",
      "url": "https://www.skills.sh/android/skills/navigation-3",
      "key": "android/skills/navigation/navigation-3/SKILL.md"
    },
    "license": "Complete terms in LICENSE.txt"
  },
  "instructions": "*** ** * ** ***\n\n## Migration guide\n\n- *[Navigation 2 to Navigation 3 migration guide](references/android/guide/navigation/navigation-3/migration-guide.md)*: Step-by-step guide to migrate an Android application from Navigation 2 to Navigation 3, covering dependency updates, route changes, state management, and UI component replacements.\n\n### Requirements\n\n- *[Guide: Migrate to type-safe navigation in Compose](references/android/guide/navigation/type-safe-destinations.md)* : Step-by-step guide to migrating an Android application from string-based navigation to **Type-Safe Navigation** in Jetpac",
  "cost": {
    "context_tokens": 1459
  }
}

Fetch it by URL: GET /api/v1/registry/android-skills-navigation-3/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.