Gokhan Arik
Gokhan Arik

Reputation: 2766

Navigation in multi-module/layer Android architecture

I decided to try multi-module Android app architecture and I've been experimenting with for a while.

For navigating between features, it is recommended to use Deep Linking in several articles.

I was wondering if anyone else has a different approach without using Deep Linking that won't cause dependency cycle.

This is the structure of my app. base module has shared pieces and all modules depend on base module. And app module is the top-level module that connects all my features. Image 1

Upvotes: 12

Views: 1667

Answers (1)

TpoM6oH
TpoM6oH

Reputation: 8585

You can create a router in the App module and an interface that it implements in the base module. Each feature module will reference the interface since they already have the dependency on the base module. App module will create the router and inject it into the feature modules.

Upvotes: 9

Related Questions