0

I have an issue in Samsung Galaxy Device. I take a picture by call Intent(MediaStore.ACTION_IMAGE_CAPTURE). My code work correctly in another device but in Samsung Galaxy S3 Device, It could not detect the orientation of this picture. The pictures give back to my app are rotated horizontal but when i save it and open it by another app (default gallery android app for example) it work so true.
This's my code:

Uri outputFileUri = Uri.fromFile(file);
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); 
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
startActivityForResult(intent, KEY_TAKE_PHOTO);

And:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (requestCode == KEY_TAKE_PHOTO&& resultCode == RESULT_OK) {
        // TODO: View this image
    }
}
Trần Đức Tâm
  • 4,037
  • 3
  • 30
  • 58

0 Answers0