title: open pdf file from asset
body: <p>good morning
  i used a code to open pdf file that exist in asset folder but the app crash every time with this message
  unable to start activity Pdfreader ActivityNoFoundExeption NoActivity found to handle intent
  this the code</p>
  
  <pre><code>package com.example.albir;
  
  import java.io.File;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  
  import android.annotation.SuppressLint;
  import android.app.Activity;
  import android.content.Context;
  import android.content.Intent;
  import android.content.res.AssetManager;
  import android.net.Uri;
  import android.os.Bundle;
  import android.util.Log;
  
  public class Pdfreader extends Activity {
       @Override
       protected void onCreate(Bundle savedInstanceState)
       {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.pdf);
           CopyReadAssets();
  
       }
  
       @SuppressLint("WorldReadableFiles")
      @SuppressWarnings("deprecation")
      private void CopyReadAssets()
       {
           AssetManager assetManager = getAssets();
  
           InputStream in = null;
           OutputStream out = null;
           File file = new File(getFilesDir(), "beralahsa001.pdf");
           try
           {
               in = assetManager.open("beralahsa001.pdf");
               out = openFileOutput(file.getName(), Context.MODE_WORLD_READABLE);
  
               copyFile(in, out);
               in.close();
               in = null;
               out.flush();
               out.close();
               out = null;
           } catch (Exception e)
           {
               Log.e("tag", e.getMessage());
           }
  
           Intent intent = new Intent(Intent.ACTION_VIEW);
           intent.setDataAndType(
                   Uri.parse("file://" + getFilesDir() + "/beralahsa001.pdf"),
                   "application/pdf");
  
           startActivity(intent);
       }
  
       private void copyFile(InputStream in, OutputStream out) throws IOException
       {
           byte[] buffer = new byte[1024];
           int read;
           while ((read = in.read(buffer)) != -1)
           {
               out.write(buffer, 0, read);
           }
       }
  
  }
  </code></pre>
  
  <p>this is the manifest </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.albir"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="18" /&gt;
       &lt;uses-permission android:name="android.permission.INTERNET"/&gt;  
       &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.example.albir.Menu"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity android:name=".ShowDetails"&gt;&lt;/activity&gt;
          &lt;activity android:name=".MainActivity"&gt;&lt;/activity&gt;
          &lt;activity android:name=".Pdfreader"&gt;&lt;/activity&gt;
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>can you please help me </p>