1
私の資産フォルダにpdfファイルが置かれていますが、私はそれを読む意志を表明しています。私はこれを行うと、アップAPOPandroidのassetsフォルダに配置されたpdfファイルを読む
Uri path = Uri.parse("file:///android:asset/about.pdf");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
は、Adobeリーダー を含むアプリケーションのリストが表示されますが、私はそれをクリックすると、ダイアログが言って表示されます: ここに私のコードである「エラー」を、ファイルパスではありません
有効どのようにこの
重複... http://stackoverflow.com/questions/3831019/how-to-read-a-pdf-in-android – himanshu
私はこれを試しました - File file = new File( "file:/// android :asset/about.pdf "); – Ankit
http://stackoverflow.com/questions/6491210/how-to-open-a-pdf-stored-either-in-res-raw-or-assets-folder –