title: Android M User Permission Error - READ and WRITE
body: <p>I just started off with android M and I am unable to access the external storage. I get the following error</p>
  
  <pre><code>Caused by: java.lang.SecurityException: Permission Denial: reading 
  com.android.providers.media.MediaProvider uri 
  content://media/external/images/media from pid=15355, uid=10053 requires 
  android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission() 
  </code></pre>
  
  <p>I am adding user-permission in manifest like </p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  </code></pre>
  
  <p>and my build file is with following settings :</p>
  
  <pre><code>compileSdkVersion 23
  buildToolsVersion "22.0.1"
  
  minSdkVersion 16
  targetSdkVersion 23
  </code></pre>
  
  <p>How to read and write from external storage in android M? </p>