How to get a result from fragment using Navigation Architecture Component? : <p>Let's say that we have two fragments: <code>MainFragment</code> and <code>SelectionFragment</code>. The second one is build for selecting some object, e.g. an integer. There are different approaches in receiving result from this second fragment like callbacks, buses etc. </p>

<p>Now, if we decide to use Navigation Architecture Component in order to navigate to second fragment we can use this code:</p>

<pre><code>NavHostFragment.findNavController(this).navigate(R.id.action_selection, bundle)
</code></pre>

<p>where <code>bundle</code> is an instance of <code>Bundle</code> (of course). As you can see there is no access to <code>SelectionFragment</code> where we could put a callback. The question is, how to receive a result with Navigation Architecture Component?</p>
