Reputation: 4711
I am not able to get GEO Exif infos from picture taken from camera.
This is the code, and the "oldExif" variable does have almost all values NULL (also GEO infos).
The "uri" variable is the uri of the image taken and created.
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != AppCompatActivity.RESULT_OK) {
return;
}
if (requestCode == REQUEST_IMAGE_CAPTURE) {
try {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) {
InputStream in = getContentResolver().openInputStream(uri);
ExifInterface oldExif = new ExifInterface(in);
// oldExif does have almost all values NULL
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
My android version is 5.0 and I already enabled the set of the camera about localization.
Indeed if I get a picture out of my app and show infos, I see geo data.
Upvotes: 0
Views: 77
Reputation: 1006724
There is no Intent
action that:
Causes a third-party camera app to offer the user to take a picture, and
Forces that camera app to add any particular EXIF tags
Your choices are:
Live without the EXIF tags
Add those tags yourself (e.g., find the user's location and put the geotags in the image), if they are missing
Upvotes: 1