title: How to write on external storage sd card in mashmallow in xamarin.android
body: <p>I started an Intent</p>
  
  <pre><code>Intent = new Intent();
  Intent.SetType("image/*");
  Intent.PutExtra(Intent.ExtraAllowMultiple,true);
  Intent.SetAction(Intent.ActionGetContent);
  StartActivityForResult(Intent.CreateChooser(Intent, "Select Picture"), code);`
  </code></pre>
  
  <p>I am working with <code>bitmap.Compress(...)</code> function and took the uri from above intent. I want to delete that bitmap file and recreate the file with the same name (in short: Replacing the existing file).</p>
  
  <p>My physical devices is Samsung J5 having Internal storage and external sd card storage like <code>/storage/emulated/0/</code> and <code>/storage/D660-18BD/</code> (D668-18BD is not fixed, it changes according to devices).</p>
  
  <p>When I tried to create a new file in the <code>storage/D660-18BD/newfile.jpg</code>, it says Access to the path is denied.</p>
  
  <p>I googled a lot but no success</p>
  
  <p>What I had tried
  1. Added Read/Write External Storage (but android take it as Internal storage) in the manifest file
  2. Added the above permission at Runtime also alongwith Read/Write URI permission.</p>