Navigation in multi-module projects, and the problem with AndroidX Navigation
summary
AndroidX Navigation works but breaks down in true multi‑module apps because destinations (fragments) own their input contracts, forcing workarounds. The video compares three concrete strategies: deep links (only simple URI‑serializable args, brittle refactors), shared resource IDs (lose SafeArgs type safety), and a bottom graph (lets SafeArgs work but creates a giant fragile central XML). Alternatives shown and demoed include activity result contracts, navigator interfaces, handwritten SafeArgs, and the third‑party library Enro which the author provides as a working solution.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:12What are multi-module projects
- 5:47Why navigation matters in multi-module
- 8:33AndroidX Navigation overview
- 10:19Deep link approach in multi-module
- 13:56Shared resource IDs approach
- 17:34Bottom graph approach
- 21:29Problems with AndroidX Navigation
- 24:59Contract-first navigation concept
- 26:44Activity result contracts solution
- 28:11Navigator interfaces solution
- 29:37Handwritten Safe Args solution
- 31:02Third-party navigation libraries
- 32:08Summary and recommendations
- 32:50Q&A session
related talks
37mHow to Avoid Chaos: Navigation as a Separate Logical Layer
27mManaging In-App Navigation with the Navigation Architecture Component
45mThe Final Word in Android Navigation
28mNavigation in a Multiplatform World
33mAdventures in Navigation
33mFinding Your Way Through the Navigation Framework
50mAndroid Navigation at scale
36mNavigation and the Single Activity: Learnings from a Skeptic
