0
Uri uri = ImageView.setImageURI(Uri.parse(new File(path).toString()));
gfgIn = getContentResolver().openInputStream(uri);
ExifInterface exifInterface = new ExifInterface(gfgIn);

The code above isn't work in my fragment. How can I rewrite it ?

Mr D
  • 9
  • 3

1 Answers1

0

Like most Android SDK classes, ExifInterface has documentation. In particular, that documentation contains a list of public constructors.

The first such constructor takes a File as its sole constructor parameter.

You appear to be looking to get this information from a File, identified by a variable named path.

So, use new ExifInterface(path).

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491