1

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.

Number70
  • 453
  • 1
  • 4
  • 16
  • Note that you can use Logcat to examine the stack trace associated with your exception: https://stackoverflow.com/questions/23353173/unfortunately-myapp-has-stopped-how-can-i-solve-this – CommonsWare May 11 '19 at 21:10

0 Answers0