1

So, I am developing a small game for my final school project, and I am having this problem, whenever I take a picture with the front facing camera, it saves it upside down, when I use the good old back camera however, it's all fine and it takes the photo properly. Here's the code that I'm using to take the picture:

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                      imageFile = new File(
                              Environment
                                      .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "goQuiz/profilePic.jpg"
                      );


                      Uri tempuri = Uri.fromFile(imageFile);
                      intent.putExtra(MediaStore.EXTRA_OUTPUT, tempuri);
                      intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
                      startActivityForResult(intent, 0);

I used this video to help me get the code done: Video.

Any help will be greatly apreciated, thanks.

Fábio Santos
  • 199
  • 1
  • 2
  • 16
  • I think it's a duplicate of http://stackoverflow.com/questions/14066038/why-image-captured-using-camera-intent-gets-rotated-on-some-devices-in-android. Also some possible answer http://stackoverflow.com/a/6124375/4807777 – Laurentiu L. May 06 '15 at 08:39
  • @LaurentiuL. I do have all of my app layouts in portrait mode. This might do the trick, give me a sec. – Fábio Santos May 06 '15 at 08:42

0 Answers0