The support library version 25.1.0 has added a new feature the ExifInterface, which back-ports features added to the ExifInterface in Android 7.1.
But how do I check if a specific file actually has a specific int or double attribute without providing a default value? Or is there an option to get a list of attributes?
There is no ready-to-use
hasAttributemethod, which would be quite convenient, but instead you could use theStringgetAttributemethod, which returnsnullwhen the file does not contain the requested attribute.Something like this:
Unfortunately there is no method to obtain all attributes from a given file.