public static ViewOrientation ofMetadata(final Metadata metadata) {
        return ViewOrientation.ofExif(MetadataUtils.getOrientation(metadata));
    }
Create orientation from an exif value, which is usually obtained from image metadata using ExifInterface
main/src/main/java/cgeo/geocaching/utils/ViewOrientation.java