{"id":19188760,"url":"https://github.com/miquido/android-navigation","last_synced_at":"2026-06-19T19:01:19.980Z","repository":{"id":162062797,"uuid":"620179851","full_name":"miquido/android-navigation","owner":"miquido","description":"Compose Navigator library which provides possibility to Control AndroidX NavController from View Model's. The project was made by Miquido: https://www.miquido.com/","archived":false,"fork":false,"pushed_at":"2026-06-17T22:40:34.000Z","size":428,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-18T00:17:00.811Z","etag":null,"topics":["android-library","androidx-navigation","compose","kotlin","kotlin-android","navigation"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miquido.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-28T07:23:56.000Z","updated_at":"2025-08-04T11:28:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff0ec273-3bc8-4432-9c82-d454d852c717","html_url":"https://github.com/miquido/android-navigation","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/miquido/android-navigation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fandroid-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fandroid-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fandroid-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fandroid-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miquido","download_url":"https://codeload.github.com/miquido/android-navigation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fandroid-navigation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34544413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-library","androidx-navigation","compose","kotlin","kotlin-android","navigation"],"created_at":"2024-11-09T11:25:56.608Z","updated_at":"2026-06-19T19:01:19.929Z","avatar_url":"https://github.com/miquido.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compose Navigator\n\nCompose Navigator provides possibility to Control AndroidX NavController from View Model's.\n\nThe library facilitates the usage of a single NavHost controlled by one point of truth - Navigator. Provides a unified interface for\nproviding results back between composables and receiving activity results.\n\n## Features\n\nView Model's can use [Navigator](/navigation-runtime/src/main/kotlin/com/miquido/android/navigation/Navigator.kt) interface provided\nby [navigation-runtime](/navigation-runtime) artifact to:\n\n- navigate forward to `route` with optional `NavOptions`\n- navigate backward\n- provide result data to previous backstack entry\n- launch and receive activity results using `ActivityResultContract`\n\nDestination routes can be identified with String or Kotlin Serializable object used\nfor [Navigation Kotlin DSL Type-Safety](https://developer.android.com/guide/navigation/design/type-safety).\n\n\u003e **Warning**: library is designed to work with a single `NavHost`. Using nested `NavHost` is not tested and can cause unexpected\n\u003e behavior.\n\n## Setup\n\nCompose Navigator is available via maven central.\n\n1. Add dependency to to `navigation-runtime`\n\n```groovy\ndependencies {\n    implementation \"com.miquido.android.navigation:navigation-runtime:[version]\"\n}\n```\n\n2. Choose dependency injection integration used in your project `navigation-hilt` or `navigation-koin`\n\n```groovy\ndependencies {\n    implementation \"com.miquido.android.navigation:navigation-hilt:[version]\"\n    // OR\n    implementation \"com.miquido.android.navigation:navigation-koin:[version]\"\n}\n```\n\n\u003e **Note**: that for multi-module project add this dependency only in application module.\n\n3. Pass `NavController` to `NavigationHandler` to start processing commands sent by `Navigator` in View Models.\n\n```kotlin\nimport com.miquido.android.navigation.handler.NavigationHandler\n\n@kotlinx.serialization.Serializable\ndata object RootRoute\n\n@kotlinx.serialization.Serializable\ndata object StartRoute\n\n\n@Composable\nfun AppRoot() {\n    // ...\n    val navController = rememberNavController()\n\n    NavigationHandler(\n        navController = navController\n    )\n\n    NavHost(\n        navController = navController,\n        route = RootRoute::class, // or simple string \"root\"\n        startDestination = StartRoute // or simple string \"start\"\n    ) {\n        // build your NavGraph\n    }\n}\n```\n\n4. Create View Model in composable using `navEntryViewModel` method.\n\n```kotlin\nimport com.miquido.android.navigation.Navigator\nimport com.miquido.android.navigation.viewmodel.navEntryViewModel\n\n@Composable\nfun StartScreen(\n    viewModel: StartViewModel = navEntryViewModel()\n) {\n}\n```\n\n\u003e **Note**: that all remaining dependency injection configuration (like using adding `@HiltViewModel` for Hilt or declaring module with\n`viewModelOf` for Koin) remains same as it was.\n\n5. (**Optional**) Add integration with [Compose Destinations](https://composedestinations.rafaelcosta.xyz/)\n\n```groovy\ndependencies {\n    implementation \"com.miquido.android.navigation:navigation-destinations:[version]\"\n}\n```\n\nUsing this artifact provides additional kotlin extension methods for:\n\n- `Navigator` to avoid calling `Direction#rote` and `Route#route` when using provided API.\n- `NavAction`'s to allow object creation using `Direction` / `Route` directly.\n\n## Samples\n\nThe repository contains few samples - showcasing:\n\n- koin integration [sample-koin](/sample-koin)\n- hilt integration [sample-hilt](/sample-hilt)\n- **TBD** compose destination integration [sample-destinations](/sample-destinations)\n\n## About\n\nThe library contains a core feature set commonly used.\nPlease do try it and open issues if you find any.\n\nAny feedback and contributions are highly appreciated!\n\n**If you like the library, consider starring and sharing it with your colleagues.**\n\n---\n\n## About Miquido\n\n- [About](https://careers.miquido.com/about-us/)\n- [Careers](https://careers.miquido.com/job-offers/)\n- [Internship at Miquido](https://careers.miquido.com/students/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiquido%2Fandroid-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiquido%2Fandroid-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiquido%2Fandroid-navigation/lists"}