Android Camera in Portrait on SurfaceView

As of API lvl 8, this is available:

public final void setDisplayOrientation (int degrees)

i.e. with portait in the manifest:

public void surfaceCreated(SurfaceHolder holder) {
    mCamera = Camera.open();
    mCamera.setDisplayOrientation(90);

Leave a Comment