I am using custom camera and surface view. But the problem is the camera orientation is not displaying in proper mode.
I tried with this code:
Camera.Parameters p = c.getParameters();
parameters.set("orientation", "portrait");
parameters.set("rotation", 90);
c.setParameters(p);
and also with this code:
mCamera.setDisplayOrientation(mRotation);
But no effect. If there any other solution for this. Please tell me.
mCamera.setDisplayOrientation(90) works perfectly for me on the devices i tested, with one notable exception (it’s quite a long shot but it might explain your issue): the Samsung Galaxy Ace, on which this function does not work as expected.