title: Should i ask READ or WRITE permission to access Mediastore images in Android Q?
body: <p>I recently updated my app to Target API 29 (Android Q). It is a Photo app which takes pictures and stores images in Gallery. I get <code>WRITE_EXTERNAL_STORAGE</code> permission to create folder in primary external storage through 'getExternalStoragePublicDirectory' and read images from the gallery. Since, the above method is deprecated and Google recommends three options and i chose Mediastore.</p>
  
  <p>Ref: <a href="https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)" rel="nofollow noreferrer">https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)</a></p>
  
  <p>Since we don't need write permission to store images anymore, i stopped asking write permission from the user when taking picture. But to read the images, we need permission. As per this table, Google recommends getting either <code>WRITE_EXTERNAL_STORAGE</code> or <code>READ_EXTERNAL_STORAGE</code>.</p>
  
  <p>Ref: <a href="https://developer.android.com/training/data-storage" rel="nofollow noreferrer">https://developer.android.com/training/data-storage</a></p>
  
  <p>It also says that "For other apps to access your file, though the other app needs the READ_EXTERNAL_STORAGE permission"</p>
  
  <p>And this recommendation in Android doc,
  <a href="https://developer.android.com/training/data-storage/shared/documents-files" rel="nofollow noreferrer">https://developer.android.com/training/data-storage/shared/documents-files</a></p>
  
  <p>“If your app uses the media store, however, you must request the READ_EXTERNAL_STORAGE permission to access other apps’ media files.”</p>
  
  <p>I tested with my existing <code>WRITE_EXTERNAL_STORAGE</code> permission and i was able to read images from gallery. But from the above recommendations, i feel that it is better I should go for <code>READ_EXTERNAL_STORAGE</code> which gives more finer permission control.</p>
  
  <p>Which one would be more appropriate?</p>