Code example for ExifInterface

Methods: getAttribute, getAttributeInt, getLatLong, toString

0
	} 
	 
	private void printExifData(File file) {
		try { 
			Log.i("CameraMapsTest", "CameraView::printExifData(): file: " + file.toString());
			ExifInterface exifIf = new ExifInterface(file.toString());
			int width = exifIf.getAttributeInt(ExifInterface.TAG_IMAGE_WIDTH, 0);
			Log.i("CameraMapsTest", "CameraView::printExifData(): width: " + width);
			float[] latLong = null;
			Log.i("CameraMapsTest", exifIf.toString());			
			 
			Log.i("CameraMapsTest", "long" + exifIf.getAttribute(ExifInterface.TAG_DATETIME));
			boolean success = exifIf.getLatLong(latLong);
			if( success ) {
				Log.i("CameraMapsTest", "CameraView::printExifData(): lat: " + latLong[0]);
				Log.i("CameraMapsTest", "CameraView::printExifData(): long: " + latLong[1]);
			} else { 
				Log.i("CameraMapsTest", "CameraView::printExifData(): no gps info on file!");
			} 
		} catch(IOException e) {
			Log.e("CameraMapsTest", "CameraView::printExifData: io exception", e);