title: Android image rotate and lost in Samsung tab
body: <p>In my app, when image taken from camera it rotates and lost in Samsung tab sometimes, in Other tab it works well always. </p>
  
  <pre><code>    public void onActivityResult(int requestCode, int resultCode, Intent data){
          if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE) {
              if (resultCode == Activity.RESULT_OK) {
  
       Bitmap bmp = (Bitmap) data.getExtras().get("data");
                          ByteArrayOutputStream stream = new ByteArrayOutputStream();
  
                          bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);
                          byte[] byteArray = stream.toByteArray();
                          imageFront=stream.toByteArray();
                          // convert byte array to Bitmap
  
                          Bitmap bitmap = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
  
                          BitmapDrawable bdrawable = new BitmapDrawable(getContext().getResources(), bitmap);
                          String aa    = getContext().getPackageCodePath();
                          Toast.makeText(getActivity(), aa,
                                  Toast.LENGTH_LONG).show();
  
                          FrontView.setBackground(bdrawable);
  }
  }
  }
  </code></pre>