title: How to get the pdf file from assets in android?
body: <p>In my application, I am getting file from assets resources and open pdf file from it.
  I am using this code:</p>
  
  <pre><code>Uri path = Uri.parse("file:///android_asset/WindsorONE_Mobile_PK.pdf"); 
  
              Intent intentPDF = new Intent(Intent.ACTION_VIEW);                     
              intentPDF.setDataAndType(path, "application/pdf");                     
              intentPDF.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);                      
              try {                         
                  startActivity(intentPDF);                     
              }                      
              catch (ActivityNotFoundException e) {                         
                  Toast.makeText(ListSample.this,                              
                       "No Application Available to View PDF",                              
                       Toast.LENGTH_SHORT).show();                     
  
              }   
  </code></pre>
  
  <p>But While I run that code. I got error Dialog that:</p>
  
  <blockquote>
    <p>"File path is not valid" </p>
  </blockquote>
  
  <p>So where I am wrong ? Please help me for that.</p>
  
  <p>Thanks.</p>