Android Studio's emulator camera opening upside down?
Asked Answered
S

3

6

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?

Spanker answered 3/1, 2019 at 18:45 Comment(0)
C
2

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

Curtcurtail answered 25/9, 2021 at 22:25 Comment(2)
I don't use Android Studio anymore so if anyone can confirm this works I'll mark this as the solutionSpanker
I had the same issue and had it working for a few minutes with the upright position, it works for me but sometimes you have to use the "upside-down" preset. Either this or that will 100% work.Curtcurtail
M
1

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"

Mandell answered 11/4, 2020 at 21:35 Comment(1)
Surprisingly this worked. Seems like a bug in the emulatorOxidize
R
0

You can try the hard way :

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

  • CTRL + F11

  • Mac : CMD + F11

Richellericher answered 3/1, 2019 at 21:21 Comment(6)
That's not doing anything for me unfortunately @RichellericherSpanker
what happens if you just open the camera from default camera app?Richellericher
Also upside downSpanker
I'm in the same boat with same setup. Did you ever wind up figuring this out?Sogdiana
@Sogdiana No I never figured this out. It was for a university project where everyone experienced the same issue and nobody managed to resolve it, sorry!Spanker
No worries, thanks for replying! I've given up as well :)Sogdiana

© 2022 - 2024 — McMap. All rights reserved.