I am developing android application. In that I have functionality of camera. I have implemented that and its working fine for me. Only thing is preview o开发者_StackOverflowf my camera, orientation is not correct its rotated. Is anybody having solution on that.
Which API are you using? If it's 1.5 or 1.6 (API 4 & API 5) there is a bug about orientation of camera. Do you see 90 degree rotated view? Check this link
If you are using SurfaceView, there is a possible solution to this problem (let c is your camera object)
Camera.Parameters p = c.getParameters();
parameters.set("orientation", "portrait");
parameters.set("rotation", 90);
c.setParameters(p);
Hope it works well for you.
精彩评论