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,
ExifInterfacehas documentation. In particular, that documentation contains a list of public constructors.The first such constructor takes a
Fileas 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).