title: Capture photo rotate 90 degree in samsung mobile
body: <p>Photo is rotating 90 degree while capturing from camera in samsung mobile rest of other mobiles(HTC) its working fine. Please help me for this.</p>
  
  <pre><code>Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
  startActivityForResult(cameraIntent, IMAGE_CAPTURE); 
  
  @Override 
   protected void onActivityResult(int requestCode, int resultCode, Intent data) {     
      super.onActivityResult(requestCode, resultCode, data);    
        try
      {
      if (requestCode == IMAGE_CAPTURE) {
         if (resultCode == RESULT_OK){
  
         Uri contentUri = data.getData();
         if(contentUri!=null)
         {
          String[] proj = { MediaStore.Images.Media.DATA };         
              Cursor cursor = managedQuery(contentUri, proj, null, null, null);         
          int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);         
          cursor.moveToFirst();         
          imageUri = Uri.parse(cursor.getString(column_index));
         }
  
         tempBitmap = (Bitmap) data.getExtras().get("data"); 
         mainImageView.setImageBitmap(tempBitmap);
         isCaptureFromCamera = true;
      }
   }
  </code></pre>