In My Android camera application, I have set my Application manifest to the Portrait. But while I am running am running my camera application, the camera preview is shown as landscape instead of the portrait.
I don’t know where the problem is, but I need help for it.
I want to Set My Camera Preview as Shown like Normal camera Preview. And set application to portrait.
Any solution for it?
Camera.setDisplayOrientation(90);should do the trick so long as it stays portrait.Also, per documentation:
This code segment can be applied to set the orientation of the camera based on the orientation of the phone.