Member-only story
Android Navigation Study Case
Notes on how to implement a navigation between multiple modules on Android.
This study aims to find a better way to create navigation between different feature modules, enabling low coupling between modules, easy maintainability and testability. These notes are from a study that I’ve been doing about navigation, and it considers at some parts an existing project. If you are starting a new project, the compose section, for example, does not make sense, unless you plan to have XML views and compose.
Also, some of the concepts here are abstract, there are some references at the end of the article and a sample project with the composition root solution.
On some of the approaches, we need to share code between different modules, and the way that I imagine doing that is like:
- Impl: Feature implementation classes;
- Public: Feature public / open classes;
So basically you will add the public module as a dependency and import any args, navigation …