title: Android - getIntent() from a Fragment
body: <p>I am trying to pass a bitmap from one fragment to another--and am using this post as a guide:</p>
  
  <p><a href="https://stackoverflow.com/questions/11010386/send-bitmap-using-intent-android">send Bitmap using intent Android</a></p>
  
  <p>What i am having trouble with is in the receiving activity fragment using getIntent(). It doesn't recognize the method. there are some posts out there saying that its not possible to use getIntent() in a fragment... but there must be a way? should the code go in the host activity?</p>
  
  <p>here is what i am trying:</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      String filename = getIntent().getStringExtra("image");
      try {
          FileInputStream is = this.openFileInput(filename);
          imageBitmap = BitmapFactory.decodeStream(is);
          is.close();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>