title: Fragment get closed after Camera Intent
body: <p>I am taking picture using camera intent in a fragment. On some devices it works perfect but on some devices my fragment get closed after taking picture.</p>
  
  <p>Here is my code of calling camera intent:</p>
  
  <pre><code>Intent picIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  getActivity().startActivityForResult(picIntent, Constants.TAKE_PICTURE_SIGN_UP);
  </code></pre>
  
  <p>Here is my MainActivity's onActivityResult:</p>
  
  <pre><code>public void onActivityResult(int requestCode, int resultCode, Intent data) {
      if(requestCode == Constants.TAKE_PICTURE_SIGN_UP || requestCode == Constants.SELECT_PICTURE_SIGN_UP)
      {
          SignUpFragment frag = (SignUpFragment)getSupportFragmentManager().findFragmentByTag(Constants.SignUpFragmentTag);
          if(frag != null &amp;&amp; frag.isVisible())
          {
              frag.onActivityResult(requestCode, resultCode, data);
          }
      }
  }
  </code></pre>
  
  <p>When I select picture from gallery it works fine but when I take picture from camera frag is null. What cause the problem here and how to solve it?</p>