title: Pass bitmap Uri to a fragment of another Activity
body: <p>I have two Activities, A and B. I start B from a fragment of A, called F. I have a bitmap object in B. I need to pass the Uri of this bitmap to F. Here is sample code,
  This code is in F:</p>
  
  <pre><code>Intent bIntent = new Intent(getActivity(), B.class);
  startActivityForResult(bIntent , 111);
  </code></pre>
  
  <p>This code is in B:</p>
  
  <pre><code>Intent aIntent = new Intent(B.this, A.class);
  aIntent.putExtra("image", uri);
  setResult(RESULT_OK, aIntent);
  finish();
  </code></pre>
  
  <p>Again this code is in F:</p>
  
  <pre><code>if(requestCode == 111 &amp;&amp; resultCode==Activity.RESULT_OK &amp;&amp; data != null) {
          Bundle extras = getActivity().getIntent().getExtras();
          if (extras != null) {
              Uri path = (Uri) extras.get("image");
              ImageView iv = (ImageView) getActivity().findViewById(R.id.myImage);
              iv.setImageURI(path);
          }            
  }
  </code></pre>
  
  <p>But it doesn't work. I need the correct code in general and in this particular case.</p>