title: Copy exif info from one Uri to the other with the new Android Scoped Storage?
body: <p>I have two <code>Uri</code> from different files with schema &quot;content&quot; obtained by the Android SAF API and I need to copy exif information from one file to the other. The destination file was created by my app so I have granted write access to it.</p>
  <p>With the <code>ContentResolver</code> I can obtain an <code>InputStream</code> that I can use to instantiate an <code>ExifInterface</code> from which I can extract the exif from the source <code>Uri</code>:</p>
  <pre><code>InputStream ins = context.getContentResolver().openInputStream(imageInputUri);
  ExifInterface originalExif = new ExifInterface(ins);
  </code></pre>
  <p>So far so good...<br />
  The problem is to write the exif info into the destination <code>Uri</code>. I can't do the same as I did with the source because an <code>ExifInferface</code> created with an <code>InputStream</code> is read-only and can't be used to save the exif info as <a href="https://developer.android.com/reference/android/media/ExifInterface#ExifInterface(java.io.InputStream)" rel="nofollow noreferrer">stated in the docs</a>.</p>
  <p>How can I solve this problem and finally be able to copy those exif info from one file to another?</p>