0

Is there any way to navigate to a <dialog /> destination through an implicit deep link without opening a new activity and without the nav_graphs knowing about each other?

Suppose I have two Activities and two nav_graphs in my app.

  • Activity A -> nav_graph_a
  • Activity B -> nav_graph_b

Each Activity contains only one nav_graph and they do not know anything about each other (decoupling).

The current screen is a fragment from nav_graph_a, but I want to show a dialog from nav_graph_b without having to open a new activity and without having to include nav_graph_b in nav_graph_a.

Is it possible?

Augusto Carmo
  • 4,386
  • 2
  • 28
  • 61
  • If the dialog only exists in Activity B, then Activity B would certainly need to be open. Why is the dialog only in Activity B if that's precisely not what you want? – ianhanniballake Aug 15 '23 at 13:51
  • Hi @ianhanniballake. I'm breaking my app into feature modules and I'm wanting to make each module know as less as possible from others. The mentioned dialog from the example will also be called by the Activity B (or Feature B), but it can also be called by Activity A (or Feature A). But I don't want Activity A to know anything about it. – Augusto Carmo Aug 15 '23 at 13:56

0 Answers0