title: Android opening pdf isn't working
body: <p>I've been trying to get this working for some time now. I've seen the other questions here about how to open pdfs from Android, and the general consensus is the code that I have below. Am I missing something?</p>
  
  <pre><code>    try
      {
          Uri path = Uri.parse("android.resource://com.TeamGLaDOS.DayTradeSim/" + R.raw.teamdoc);
          Intent intent = new Intent(Intent.ACTION_VIEW);
          intent.setDataAndType(path, "application/pdf");
          this.startActivity(intent);
      }
      catch(ActivityNotFoundException e)
      {
          Toast.makeText(this, "No Application Available to view PDF",     Toast.LENGTH_SHORT).show();
      }
  </code></pre>
  
  <p><strong>Edit:</strong> It always throws the ActivityNotFoundException and shows the Toast. </p>
  
  <p>The exception message is this:</p>
  
  <pre><code>android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=android.resource://com.TeamGLaDOS.DayTradeSim/2130968576 typ=application/pdf }
  </code></pre>
  
  <p><strong>Edit 2:</strong> I have a pdf application installed (Aldiko) and I've used other apps to launch pdfs in Aldiko before. </p>