在我们的应用程序中从Android设备的SD卡中打开PDF和3DPDF

时间:2016-05-18 07:31:43

标签: android

有没有办法从android中的设备的SD卡打开PDF和3DPDF内部应用程序。

1 个答案:

答案 0 :(得分:0)

尝试{

文件file = newFile(Environment.getExternalStorageDirectory()。getAbsolutePath()+" /Foxit/yogamags.pdf");

Intent intent = new Intent(Intent.ACTION_VIEW);

intent.setDataAndType(Uri.fromFile(file)," application / pdf");

intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);

startActivity(意向);

}

catch(例外e){

Toast.makeText(getActivity(),"无法打开PDF",Toast.LENGTH_SHORT).show();

}