Code example for ExifInterface

Methods: saveAttributes, setAttribute

0
			} 
 
			// Adding Exif data for the orientation. For some strange reason the 
			// ExifInterface class takes a string instead of a file. 
			try { 
				exif = new ExifInterface("/sdcard/" + dir + fileName); 
				exif.setAttribute(ExifInterface.TAG_ORIENTATION, "" + orientation); 
				exif.saveAttributes(); 
			} catch (IOException e) { 
				e.printStackTrace(); 
			} 
 
		} 
	}; 
 
	/** 
	 * Putting in place a listener so we can get the sensor data only when 
	 * something changes. 
	 */ 
	public void onSensorChanged(SensorEvent event) {
		synchronized (this) {