Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get all details of an image pragmatically available in Android phone gallery

I am trying to fetch all details (specially location) available with image in phone gallery.Those will come when user click on details. So please tell me how can i do this. Refer screenshots for better understanding. Thanks in advance

image

like image 522
Faisal Khan Avatar asked Sep 16 '25 09:09

Faisal Khan


2 Answers

You Should Go with ExifInterface class to read various EXIF metadata from Images:

Example :

ExifInterface exif = new ExifInterface(filepath_to_get_value_from);
exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE);
exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF);
exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE);
exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF);

To Convert this into Real Values this Blog look blog.

like image 175
W4R10CK Avatar answered Sep 17 '25 22:09

W4R10CK


you can use android's ExifInterface for doing this. This is a class for reading and writing Exif tags in a JPEG file or a RAW image file. Supported formats are: JPEG, DNG, CR2, NEF, NRW, ARW, RW2, ORF and RAF.

Refer it from here Android ExifInterface

like image 36
Akshay Tilekar Avatar answered Sep 17 '25 23:09

Akshay Tilekar