ExifInterface:https://developer.android.com/reference/android/media/ExifInterface
添加信息:
ExifInterface exif = new ExifInterface(imagePath);
// 写入经度信息
exif.setAttribute(ExifInterface.TAG_GPS_LONGITUDE,gpsInfoConvert(lng));
exif.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF,lng > 0 ? "E" : "W");
exif.setAttribute(ExifInterface.TAG_GPS_LATITUDE,gpsInfoConvert(lat));
exif.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF,lat > 0 ? "N" : "S");
exif.setAttribute(ExifInterface.TAG_DATETIME,getNowTime("YYYY:MM:DD HH:mm:SS"));
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){
//exif.setAttribute(ExifInterface.TAG_USER_COMMENT,ToPinyin(address));
exif.setAttribute(ExifInterface.TAG_DATETIME_ORIGINAL,getNowTime("YYYY:MM:DD HH:mm:SS"));
}
exif.saveAttribu