Android 打开Pdf文件?

Android 打开Pdf文件?,android,Android,我想在Android中打开pdf 我目前正在使用代码 File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + path.get((int) v.getTag())); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromF

我想在Android中打开pdf
我目前正在使用代码

File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + path.get((int) v.getTag()));
                Intent intent = new Intent(Intent.ACTION_VIEW);
                intent.setDataAndType(Uri.fromFile(file), "application/pdf");
                intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
                mContext.startActivity(intent);
但该文件当前未打开


关于

如果安装了多个阅读器,则代码不会打开文件,而是让用户选择一个pdf阅读器。此外,您应该告诉file.getAbsoluteParh()的值
path.get((int)v.getTag())
这不是很有用@greenapps,代码中到底有什么错误。你还没有对我的评论做出反应。你也没有提供要求的信息。有什么理由不这么做吗?@greenapps。你有skype吗?或者你能在这里创建一个我们可以互动的房间吗?房间在这里:。只需在此处作出反应并提供所需信息。为什么你想得到不同的对待?