title: How to open a local PDF file from an Android application
body: <p>I'm trying to open a PDF file out of my Android application using Adobe Reader. When my code gets excecuted, the Adobe Reader opens but throws the following error:<strong>'Error: The document path is not valid'</strong> The file blabla.pdf is in my <strong>Application</strong> rootfolder</p>
  
  <pre><code>String filename = "blabla.pdf";
  File file = new File(filename);
  Uri internal = Uri.fromFile(file);
  Intent target = new Intent(Intent.ACTION_VIEW);
  target.setDataAndType(internal, "application/pdf");
  target.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  
  intent = Intent.createChooser(target, "Open File");
  try {
      startActivity(intent);
  } catch (ActivityNotFoundException e) {
      Toast.makeText(this, "U hebt geen PDF viewer geïnstalleerd op dit toestel. " +
          "Ga naar de app store en download een PDF viewer om dit bestand te openen.", Toast.LENGTH_LONG).show();
  }
  startActivity(intent);
  </code></pre>
  
  <p>I want to use internal storage, not external storage.
  I've used this example: <a href="https://stackoverflow.com/questions/17453105/android-open-pdf-file">Link</a> and didn't really understand these 2 examples: <a href="https://stackoverflow.com/questions/19488434/internal-storage-the-document-path-is-not-valid">Link1</a> and <a href="https://stackoverflow.com/questions/5766609/save-internal-file-in-my-own-internal-folder-in-android">Link2</a></p>