title: Displaying images from SDCard in a Widget from MarshMallow
body: <p>In a widget I display images from SDCard using <code>remoteView.setImageViewUri()</code>. This strategy works correctly except with MarshMallow:</p>
  
  <p>The error is:</p>
  
  <pre><code>Unable to open content:  file:///storage/emulated/0/Android/data/applicaitonPackage/files/file.png
  open failed: EACCESS (Permission denied)
  </code></pre>
  
  <p>It's clear that this is a permission problem, but I don't know how to give permissions to the widget container and in theory (see Note 1) the images are already stored in shared storage.</p>
  
  <p><strong>Note 1</strong>: The directory where images are stored is shared storage under <code>Environment.getExternalStorageDirectory()</code></p>
  
  <p><strong>Note 2</strong>: Application is not adapted to MarshMallow and uses targetSdkVersion=15</p>
  
  <p><strong>Note 3</strong>: Don't just reply explaining about new runtime permissions in MarshMallow. I already know permissions changes and that is not the problem because application is targeted SDKVersion 15 and the app hasn't any problem accessing the external storage, the problem is with the widget container that is the one that I suspect that doesn't has the permissions.</p>