Java tutorial
//package com.java2s; import android.media.ExifInterface; import java.io.IOException; public class Main { public static int getOrientationFromExif(String localPath) { ExifInterface exif = null; int orientation = 0; try { exif = new ExifInterface(localPath); orientation = exif.getAttributeInt("Orientation", 0); } catch (IOException ex) { } return orientation; } }