Last active
November 18, 2022 13:38
-
-
Save savvasdalkitsis/fc4f95a78b1d5f9433c6abdf30c56c76 to your computer and use it in GitHub Desktop.
blog_post_exif_data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun getLocation(photoUri: Uri): Pair<Double, Double> { | |
contentResolver.openInputStream(photoUri).use { stream -> | |
val latLon = ExifInterface(stream).latLong | |
return Pair(latLon[0], latLon[1]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment