title: onActivityResult is not calling after taking camera picture
body: <p>I am doing an android app, in which I have a functionality that, I need to open camera and take a picture. After taking picture onActivityResult is not called. my screen remains only in camera state.</p>
  
  <p>My code:</p>
  
  <pre><code>Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  File mediaFile = new File(
           MediaStore.Images.Media.EXTERNAL_CONTENT_URI.getPath());
  Uri imageUri = Uri.fromFile(mediaFile);
           intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
           startActivityForResult(intent, 1);
  </code></pre>
  
  <p><strong>onActivityResult code</strong> </p>
  
  <pre><code>@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if (data != null &amp;&amp; !data.toString().equalsIgnoreCase("Intent {  }"))
          switch (requestCode) {
          case 1:
              Log.i("StartUpActivity", "Photo Captured");
               Uri uri = data.getData();
               String imgPath = getRealPathFromURI(uri);
              bitmap = (Bitmap) data.getExtras().get("data");
              MediaStore.Images.Media.insertImage(getContentResolver(),
                      bitmap, null, null);
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);
              img1.setImageBitmap(bitmap);
  }
  }
  </code></pre>