title: Android: While opening pdf "this file could not be accessed". c#
body: <p>I have an app that builds a listView of all the PDFs in a specified folder already located on the Android machine. The file path and name are stored in an array called <code>files[]</code> and I can grab a full path with <code>files[e.Position]</code>. </p>
  
  <p>Here is my C# code</p>
  
  <pre><code>public void documentListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
      {       
      var bytes = File.ReadAllBytes(files[e.Position]);
  
  
              Android.Net.Uri pdfPath = Android.Net.Uri.Parse(files[e.Position]);
  
              Intent intent = new Intent(Intent.ActionView);
              intent.SetDataAndType(pdfPath, "application/pdf");
              intent.SetFlags(ActivityFlags.NewTask);
  
             StartActivity(intent);
  }
  </code></pre>
  
  <p>I have also added this to my manifest:</p>
  
  <pre><code>    &lt;uses-persmission android:name="android.permissions.READ_EXTERNAL_STORAGE" /&gt;
  &lt;uses-persmission android:name="android.permissions.WRITE_EXTERNAL_STORAGE" /&gt;
  </code></pre>
  
  <p>Every time I click the button it starts to open adobe (which is great) and then it says <code>This file could not be accessed</code>.</p>
  
  <p>However, I can open the file directly by going to the folder. Any Ideas? </p>
  
  <p>P.S. I have checked what files[e.Position] resolves to and it is correct  <code>/mnt/sdcard/PLA/testpdt.pdf</code>.</p>