Android Studio's emulator camera opening upside down?

Viewed 2069

I'm running a Nexus 5, API 23, and opening the camera with:

    Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

However once this opens the camera appears upside down by default like this:

Upside down camera example

I've checked other threads which say to disable 'Use Host GPU' and to set the activity's screenOrientation to sensorPortrait but these haven't worked. Any ideas?

3 Answers

In the Android Emulator, press the 3 dots (...). Then click on Virtual Sensors.

When in the menu, there are 4 presets. You want to press the first one, which is upright. You may also have to use the other (upside down) one.

Virtual Sensors Menu

You can try the hard way :

  • There is a button in the side bar. Try using that

  • CTRL + F11

  • Mac : CMD + F11

I was having a problem with the camera being upside down for all apps, which strangely was fixed when I went into the emulator settings and unchecked "enable keyboard input"

Related