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 ?
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 ?
Copyright © 2021 Jogjafile Inc.
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 namedpath
.So, use
new ExifInterface(path)
.