I'm having trouble with Exifinterface. Im trying to figure it out for 3 days but can't find the solution to it. I have an app where you can make pictures and load images from the gallery, but I also need the GPS_LATTITUDE, GPS_LONGTITUDE and DATETIME.
In the onActivityResult I have:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == RESULT_OK && requestCode == PICK_IMAGE){
imageUri = data.getData();
imageView.setImageURI(imageUri);
}
if(resultCode == RESULT_OK && requestCode == 0){
Bitmap bitmap = (Bitmap)data.getExtras().get("data");
imageView.setImageBitmap(bitmap);
}
imageUri is used to get the pictures from the gallery and the bitmap is used to take picture's with the camera. My question is: How can I use exifinterface in this case? I can't figure it out. What I tried is:
ExifInterface exif = new ExifInterface(imageUri.getPath());
but i'm getting an exception error and I can't go further.