Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android how to access the location data in a jpg

I'm making an Android app that includes a feature to show images on a map.

How can I extract the location data from a .jpg file (if there is location data)?

Many thanks, Todd.

like image 675
Todd Davies Avatar asked Jun 07 '12 11:06

Todd Davies


1 Answers

There is nice tutorial how to access exif data (that includes GPS info you need) from jpg that can help you:
http://android-coding.blogspot.com/2011/10/read-exif-of-jpg-file-using.html

The corresponding class is described in official docs:
http://developer.android.com/reference/android/media/ExifInterface.html

Also useful post (convert GPS info) can be found:
http://android-coding.blogspot.com/2011/10/convert-gps-tag-of-exifinterface-to.html

like image 161
Bo. Avatar answered Sep 30 '22 03:09

Bo.