get Media Record Rotation - Android Camera

Android examples for Camera:Camera Rotate

Description

get Media Record Rotation

Demo Code


//package com.java2s;

public class Main {

    public static int getMediaRecordRotation(int previewDegrees,
            int orientation, boolean isFrontCamera) {
        int degree = (previewDegrees + orientation + (isFrontCamera
                && orientation != 0 && orientation % 90 == 0 ? 180 : 0)) % 360;
        return degree;
    }/*from  w w  w .  j  a v a2  s  .c  om*/
}

Related Tutorials