用ExifInterface读取经纬度的时候遇到的一个问题

如果读取图片经纬度,使用

 String latValue = exifInterface.getAttribute(ExifInterface.TAG_GPS_LATITUDE);
 String lngValue=exifInterface.getAttribute(ExifInterface.TAG_GPS_LONGITUDE);

直接读取经纬度的话会返回null

String latValue = exifInterface.getAttribute(ExifInterface.TAG_GPS_LATITUDE);
String lngValue = exifInterface.getAttribute(ExifInterface.TAG_GPS_LONGITUDE);
String latRef = exifInterface.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF);
String lngRef = exifInterface.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF);

同时读取经纬度加经纬度参考信息才能获取正确的信息

具体原因不详,实践出来的结果。。。求教地理大佬

坑了我半天!!!!!!!!!!

原文地址:https://www.cnblogs.com/wkmocr/p/7745828.html