Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do you extract the geolocation information from a photo in android?

I am fairly new to android and I am creating an app that uses the camera intent to take a photo and stores it into a database along with some other info. my trouble is that I need to get the latitude and longitude from that photo and store it into the database as well. I have searched very thoroughly and can not seem to find out how to extract the location information from a photo. any help will be greatly appreciated.

thanks in advance

like image 730
waa1990 Avatar asked Dec 06 '25 13:12

waa1990


1 Answers

Create an ExifInterface from the filename and then you can call getLatLong() to get the coordinates.

like image 112
Daniel DiPaolo Avatar answered Dec 08 '25 02:12

Daniel DiPaolo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!