时可以打开摄像头意图安卓仅在人像模式,也就是即使用户翻转装置,相机仍然会在纵向模式下,
Is it possible to open the Camera Intent in android in only portrait mode, that is even if the user flipped the device, the camera will still be in portrait mode,
我尝试了以下的答案:强制人像模式,但没有工作,谢谢
I tried the following answer: Force Portrait Mode but didn't work, Thanks
随着API的LVL 8,这是可用的:
As of API lvl 8, this is available:
公众最终无效setDisplayOrientation(INT度)
public final void setDisplayOrientation (int degrees)
即。与波泰特在清单:
public void surfaceCreated(SurfaceHolder holder) {
mCamera = Camera.open();
mCamera.setDisplayOrientation(90);
请参阅本链接相机