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.