Best code examples for Android ExifInterface class (android.media.ExifInterface)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ExifInterface class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android ExifInterface examples from Open Source projects
This code example shows how to use the following methods: getAttribute
16:	ExifInterface exif = new ExifInterface(imgPath); 
17:	String rotationAmount = exif.getAttribute(ExifInterface.TAG_ORIENTATION); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAttributeInt
100:	ExifInterface exifInterface = new ExifInterface(filepath); 
101:	int exifRotation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION,ExifInterface.ORIENTATION_UNDEFINED); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttributeInt
48:	exif = new ExifInterface(filepath); 
-
53:	int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, -1); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAttributeInt
120:	ExifInterface exif = new ExifInterface(fileName); 
121:	int rotation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: saveAttributes, setAttribute
88:	mExif.setAttribute(tag, value); 
-
101:	mExif.saveAttributes(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttributeInt
163:	ExifInterface exif = new ExifInterface(_path); 
164:	int exifOrientation = exif.getAttributeInt( 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttribute, saveAttributes, setAttribute
99:	ExifInterface exif = new ExifInterface(path); 
-
102:	exif.setAttribute(ExifInterface.TAG_GPS_LATITUDE, latitudeStr); 
103:	exif.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF, latitude>0?"N":"S"); 
-
106:	exif.setAttribute(ExifInterface.TAG_GPS_LONGITUDE, longitudeStr); 
107:	exif.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF, longitude>0?"E":"W"); 
-
110:	exif.saveAttributes(); 
-
113:	String exifLAT = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE); 
-
115:	String exifLONG = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttribute
244:	ExifInterface exifInterface = new ExifInterface(file); 
245:	exif[0] = exifInterface.getAttribute(ExifInterface.TAG_ORIENTATION); 
246:	exif[1] = exifInterface.getAttribute(ExifInterface.TAG_GPS_LATITUDE); 
247:	exif[2] = exifInterface.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF); 
248:	exif[3] = exifInterface.getAttribute(ExifInterface.TAG_GPS_LONGITUDE); 
249:	exif[4] = exifInterface.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttribute
75:	ExifInterface ei = new ExifInterface(photoUri.toString()); 
76:	Log.d("EXIF",ei.getAttribute(ExifInterface.TAG_DATETIME)); 
77:	Log.d("EXIF",ei.getAttribute(ExifInterface.TAG_FLASH)); 
78:	Log.d("EXIF",ei.getAttribute(ExifInterface.TAG_GPS_LATITUDE)); 
79:	Log.d("EXIF",ei.getAttribute(ExifInterface.TAG_GPS_LONGITUDE)); 
80:	Log.d("EXIF",ei.getAttribute(ExifInterface.TAG_IMAGE_LENGTH)); 
81:	Log.d("EXIF",ei.getAttribute(ExifInterface.TAG_IMAGE_WIDTH)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttributeInt
178:	int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1); 
-
193:	return new ExifInterface(getTempCaptureFile().getAbsolutePath()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttributeInt
242:	ExifInterface exif = new ExifInterface(imagePath); 
243:	orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, -1); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttribute, saveAttributes, setAttribute
55:	ExifInterface mExifInterface = new ExifInterface(uri); 
56:	String str = mExifInterface.getAttribute("UserComment"); 
-
61:	mExifInterface.setAttribute("UserComment","2010:12:07 11:20:34, TAG1, TAG2"); 
62:	mExifInterface.saveAttributes(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: saveAttributes, setAttribute
69:	mExif.setAttribute(tag, value); 
-
82:	mExif.saveAttributes(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttributeInt, saveAttributes, setAttribute
50:	ExifInterface exifInterface = new ExifInterface(filePath); 
51:	int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED); 
-
60:	exifInterface.setAttribute(ExifInterface.TAG_ORIENTATION, "0"); 
61:	exifInterface.saveAttributes(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: saveAttributes, setAttribute
24:	exifFileInterface = new ExifInterface(filename); 
-
30:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LONGITUDE, longString); 
31:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LATITUDE, latString); 
-
36:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF, "N"); 
-
38:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF, "S"); 
-
43:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF, "E"); 
-
45:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF, "W"); 
-
50:	exifFileInterface.saveAttributes(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttribute, getAttributeInt, getLatLong, toString
71:	ExifInterface exifIf = new ExifInterface(file.toString()); 
72:	int width = exifIf.getAttributeInt(ExifInterface.TAG_IMAGE_WIDTH, 0); 
-
75:	Log.i("CameraMapsTest", exifIf.toString()); 
-
77:	Log.i("CameraMapsTest", "long" + exifIf.getAttribute(ExifInterface.TAG_DATETIME)); 
78:	boolean success = exifIf.getLatLong(latLong); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttributeInt
184:	exif = new ExifInterface(filepath); 
-
189:	int orientation = exif.getAttributeInt( 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: saveAttributes, setAttribute
24:	exifFileInterface = new ExifInterface(filename); 
-
30:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LONGITUDE, longString); 
31:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LATITUDE, latString); 
-
36:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF, "N"); 
-
38:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF, "S"); 
-
43:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF, "E"); 
-
45:	exifFileInterface.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF, "W"); 
-
50:	exifFileInterface.saveAttributes(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttribute
13:	ExifInterface exif = new ExifInterface(imgPath); 
14:	String rotationAmount = exif.getAttribute(ExifInterface.TAG_ORIENTATION); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttribute
84:	ExifInterface exif = new ExifInterface(img_file.getAbsolutePath()); 
-
174:	w = Float.valueOf(exif.getAttribute(ExifInterface.TAG_IMAGE_LENGTH)); 
175:	h = Float.valueOf(exif.getAttribute(ExifInterface.TAG_IMAGE_WIDTH)); 
-
178:	w = Float.valueOf(exif.getAttribute(ExifInterface.TAG_IMAGE_WIDTH)); 
179:	h = Float.valueOf(exif.getAttribute(ExifInterface.TAG_IMAGE_LENGTH)); 
-
198:	Integer orient = Integer.valueOf(exif.getAttribute(ExifInterface.TAG_ORIENTATION)); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
201:	exif = new ExifInterface(fileName); 
-
205:	int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
170:	ExifInterface exif = new ExifInterface(uri.getPath()); 
-
172:	exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAttribute
86:	ExifInterface exif=new ExifInterface( image ); 
87:	_orientation=Integer.parseInt( exif.getAttribute(ExifInterface.TAG_ORIENTATION) ); 
-
89:	int width =Integer.parseInt( exif.getAttribute(ExifInterface.TAG_IMAGE_WIDTH) ); 
90:	int height=Integer.parseInt( exif.getAttribute(ExifInterface.TAG_IMAGE_LENGTH) ); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
252:	exif = new ExifInterface(filepath); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
222:	exif = new ExifInterface(filepath); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
299:	ExifInterface exif = new ExifInterface(pathToOriginal); 
300:	int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
131:	exif = new ExifInterface(file.getAbsolutePath()); 
-
137:	int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
11:	ExifInterface exifInterface = new ExifInterface(file_path); 
12:	int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getThumbnail, hasThumbnail
33:	ExifInterface exif = new ExifInterface(data); 
34:	if (exif.hasThumbnail()) { 
35:	thumbnail = exif.getThumbnail(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttribute
20:	ExifInterface exif = new ExifInterface(imgPath); 
21:	String rotationAmount = exif.getAttribute(ExifInterface.TAG_ORIENTATION); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
35:	ExifInterface exif = new ExifInterface(imagePath); 
36:	int orientation = exif.getAttributeInt( 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
58:	exif = new ExifInterface(fileUri.getPath()); 
59:	imageExifOrientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: saveAttributes, setAttribute
87:	mExif.setAttribute(tag, value); 
-
100:	mExif.saveAttributes(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getThumbnail, hasThumbnail
33:	ExifInterface exif = new ExifInterface(data); 
34:	if (exif.hasThumbnail()) { 
35:	thumbnail = exif.getThumbnail(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttribute
265:	return(tag + " : " + exif.getAttribute(tag) + "\n"); 
-
291:	ExifInterface exif = new ExifInterface(picturePath); 
-
293:	if(exif.getAttribute(ExifInterface.TAG_DATETIME)!=null) { 
-
297:	if(exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE)!=null && exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE)!=null) { 
-
299:	double longitude = Double.parseDouble(exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE)); 
300:	double latitude = Double.parseDouble(exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE)); 
-
304:	if(exif.getAttribute(ExifInterface.TAG_MAKE)!=null) { 
305:	_MAKE = exif.getAttribute(ExifInterface.TAG_MAKE); 
-
308:	if(exif.getAttribute(ExifInterface.TAG_MODEL)!=null) { 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttribute
53:	ExifInterface exif = new ExifInterface("/sdcard/big.jpg"); 
54:	String time = exif.getAttribute(ExifInterface.TAG_DATETIME); 
-
58:	String model = exif.getAttribute(ExifInterface.TAG_MODEL); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: saveAttributes, setAttribute
87:	mExif.setAttribute(tag, value); 
-
100:	mExif.saveAttributes(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
94:	ExifInterface exif = new ExifInterface(uri.getPath()); 
95:	int orientation = exif.getAttributeInt( 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttribute
66:	ExifInterface ei = new ExifInterface(physLink); 
-
68:	.getAttribute(ExifInterface.TAG_IMAGE_WIDTH)); 
-
70:	.getAttribute(ExifInterface.TAG_IMAGE_LENGTH)); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getThumbnail, hasThumbnail
49:	ExifInterface exif = new ExifInterface(contentUri.getPath()); 
50:	if (exif.hasThumbnail()) { 
51:	return exif.getThumbnail(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getThumbnail, hasThumbnail
49:	ExifInterface exif = new ExifInterface(contentUri.getPath()); 
50:	if (exif.hasThumbnail()) { 
51:	return exif.getThumbnail(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
502:	ExifInterface exif = new ExifInterface(filePath); 
503:	int exifOrientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getThumbnail, hasThumbnail
70:	ExifInterface exif = new ExifInterface(path); 
71:	if (exif.hasThumbnail()) { 
72:	byte[] exifThumbBytes = exif.getThumbnail(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
175:	exif = new ExifInterface(imageFile.getAbsolutePath()); 
176:	orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getThumbnail, hasThumbnail
70:	ExifInterface exif = new ExifInterface(path); 
71:	if (exif.hasThumbnail()) { 
72:	byte[] exifThumbBytes = exif.getThumbnail(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
35:	ExifInterface exif = new ExifInterface(imagePath); 
36:	int orientation = exif.getAttributeInt( 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAttributeInt
180:	ExifInterface exif = new ExifInterface(uri.getPath()); 
-
182:	.getAttributeInt(ExifInterface.TAG_ORIENTATION, 
Full Snippet Info
5
CodeRank
Related Android ExifInterface Questions & Answers:
See Code Examples for Android ExifInterface Methods: