title: Open Camera/Gallery with Android Navigation Arch Component (JetPack)
body: <p>I'm using the navigation arch component in my app and I have +/- under control the navigation between fragments and even with other activities in the same app. </p>
  
  <p>But now I want to get a photo from the camera or from the gallery. The example to do it is pretty clear in the official <a href="https://developer.android.com/training/camera/photobasics" rel="nofollow noreferrer">documentation</a> without the navigation arch component. Basically you need these two methods <code>startActivityForResult</code> and <code>onActivityResult</code>.</p>
  
  <p>But I don't know what to do to with navigation arch component to have the same result. I've found this <a href="https://medium.com/a-problem-like-maria/a-problem-like-navigation-part-2-63e46a565d4b" rel="nofollow noreferrer">article</a> but the case is for activities in the same app, so it's not the same case.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks in advance.</p>