0
I need to take a photo and save it to the gallery and then send it to the database. However, I wanted to know how to save the coordinates along with the image information. Remembering that I can already get my location, I just can’t save it on the information in the image.
private File createImageFile() throws IOException {
// Create an image file name
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = JPEG_FILE_PREFIX + timeStamp + "_";
File albumF = getAlbumDir();
File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);
return imageF;
}
In the above code I am setting name, format and folder.
In your bank, do you have the columns to receive the longitude latitude for each image?! That your bank is external or internal?
– viana
I have an internal bank that saves the path of photo, longitude, and latitude, that information sent to the external bank. However, I would have to select the image to show in an Imageview and take Lon and lat for this image, but I couldn’t. I found the following way to get this inf from the image, but I’m having to fix this information or editing the image and placing the location.
– Juliano Morche
Exifinterface Exif = new Exifinterface(imgPath); latitude = Exif.getattribute(Exifinterface.TAG_GPS_LATITUDE); longitude = Exif.getattribute(Exifinterface.TAG_GPS_LONGITUDE);
– Juliano Morche
Dude, what’s your problem? Only with this code you can’t see much, it’s not very clear. Where’s the part you record in the bank? Little information on your question.
– viana