title: Android 11 get image orientation from EXIF
body: <p>Hi I have an app with compileSdkVersion 30 and targetSdkVersion 30.
  Since I need to know the orientation of image, I wrote these:</p>
  <pre><code>val exif = ExifInterface(imageFile.absolutePath)
              val orientation = exif.getAttributeInt(
                  ExifInterface.TAG_ORIENTATION,
                  ExifInterface.ORIENTATION_NORMAL
              )
  
              when (orientation) {
                  ExifInterface.ORIENTATION_ROTATE_270 -&gt; rotate = 270
                  ExifInterface.ORIENTATION_ROTATE_180 -&gt; rotate = 180
                  ExifInterface.ORIENTATION_ROTATE_90 -&gt; rotate = 90
              }
  </code></pre>
  <p>But there was an exception shows like:</p>
  <pre><code>java.io,FileNotFoundException:/storage/emulated/0/DCIM/Camera/xxx.jpg: open failed EACCESS(Permission denied)
  ...
  at android.media.ExifInterface.&lt;init&gt;(ExifInterface.java.1389)
  </code></pre>
  <p>What I would like to do is get image and know its orientation, but I can not find any sample on Internet. Can anybody give me a hint? thanks!</p>