get Camera Orientation - Android Camera

Android examples for Camera:Camera Orientation

Description

get Camera Orientation

Demo Code

import android.hardware.Camera;

public class Main {
  public static int getCameraOrientation(int cameraId) {
    Camera.CameraInfo info = new Camera.CameraInfo();
    Camera.getCameraInfo(cameraId, info);
    return info.orientation;
  }/*from  ww w . java 2 s.c  om*/
}

Related Tutorials