This topic has been discussed in lots of questions here, with mostly different results and, due to API changes and different types of URIs, no definitive answer
Getting EXIF from a content URI (an InputStream actually) is now available in the support library.
See: https://android-developers.googleblog.com/2016/12/introducing-the-exifinterface-support-library.html