重複の可能性:
AndroidでPDFを開く
AndroidアプリケーションからAdobeReaderでPDFファイルを開きたいのですが。
/ mnt / sdcardにtest.pdfというPDFファイルがあり、次のコードを使用しています。
file = new File ("/mnt/sdcard/test.pdf");
if (file.exists())
{
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.fromFile(file));
intent.setType("application/pdf");
intent.setPackage("com.adobe.reader");
startActivity(intent);
}
このコードを実行するとAdobeReaderが開きますが、ファイルは開きません。ファイルは有効です。
何が問題ですか?