-4
A
回答
0
你可以使用类似这样的例子 - 获取的文件路径,并打开它作为一个新的意图:
// get the file path from the external storage (SD card)
File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/yourPdfName.pdf");
Intent intent = new Intent(Intent.ACTION_VIEW);
// set the content type and data of the intent
intent.setDataAndType(Uri.fromFile(file), "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
// start the intent as a new activity
startActivity(intent);
相关问题
- 1. 如何从Android中的SD卡读取文本文件?
- 2. 如何使用PhoneGap在SD卡中读取/写入文件?
- 3. 从SD卡读取.xml文件
- 4. android从sd卡读取文件
- 5. 如何读取SD卡中的txt文件?
- 6. 如何从SD卡读取原始文本文件?
- 7. 如何在android中读取pdf文件?
- 8. 从SD卡上的文件中读取显示文字信息
- 9. 如何在SD卡中列出文件?
- 10. 在webview的帮助下从sd-card中读取pdf文件
- 11. 如何删除SD卡中的文件?
- 12. 如何挑选SD卡中的文件?
- 13. 在Samsung Galaxy S sd卡上读取和写入文本文件
- 14. 我怎样才能加载我的pdf文件从SD卡
- 15. 如何获得动态读取文件和从SD卡写入文件
- 16. 如何从保存在SD卡中的json文件中读取数据?
- 17. 从android中读取SD卡中的特定文件
- 18. 尝试从其他语言的SD卡读取文本文件
- 19. 如何读取URL在IOS PDF文件
- 20. Android中的SD卡的写入和文件读取
- 21. 如何从SD卡中删除文件?
- 22. 如何在Android中获取SD卡上文件夹的大小?
- 23. 如何在Qt中获取SD卡的文件系统格式?
- 24. 估算在Android上从SD卡读取大文件的时间
- 25. 如何从SD卡中获取文件路径在android
- 26. 如何从列表视图中的SD卡文件夹中获取文件
- 27. 如何从SD卡中动态读写文件
- 28. Android的:如何在我的SD卡的地方写文件
- 29. 从SD卡上的XML文件读取时发生的问题
- 30. 如何选择一个文件夹下载文件在SD卡
这不会显示在TxtView PDF文件的内容。 – greenapps
看看这个问题,以显示它在textView http://stackoverflow.com/questions/25739313/how-can-i-display-a-pdf-document-into-a-textview –