为什么每次我尝试使用以下代码在我的SDCARD中打开pdf文件时,它实际上并不打开pdf文件本身,而是进入adobe reader菜单?我的代码有什么问题吗?
Intent intent = new Intent();
File pdfFile = new File("/sdcard/sample.pdf");
Uri path = Uri.fromFile(pdfFile);
intent.setAction(Intent.ACTION_VIEW);
intent.setData(path);
intent.setType("application/pdf");
intent.setPackage("com.adobe.reader");
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)