I'm developing an app targeted SDK 8 with min SDK 7 that uses a camera view.
Obviously there is this issue of rotating the Camera for portrait that has had a fair amount of discussion already. I currently have the following fix that separates SDK 7 and 8+:
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.FROYO){
theCamera.setDisplayOrientation(90);
} else {
parameters.set("orientation", "portrait");
parameters.set("rotation",90);
}
Which works on both a 2.1update1 device and an SGS2 I have (running ICS).
My question is, what kind of reliability do these solutions have across devices? I've seen a few solutions to the 'pre-froyo' situation, so I'm dubious of this solution working for all devices. I'm also wondering how well 'setdisplayorientation' is respected on different devices...
I'd be really grateful to hear of other's experience with this.
So some more info: How to set Android camera orientation properly? This explains that these methods work some of the time. So the further question from what point (SDK version) did setDisplayOrientation start working ALL of the time??