-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. 從SD卡讀取文件
- 2. 如何在Android中讀取SD卡中的.doc文件?
- 3. 如何從Android中的SD卡讀取文本文件?
- 4. 讀取SD卡上的文件
- 5. 在Android中讀取SD卡中的文本文件時出錯
- 6. 如何使用PhoneGap在SD卡中讀取/寫入文件?
- 7. 從SD卡讀取.xml文件
- 8. android從sd卡讀取文件
- 9. 如何讀取SD卡中的txt文件?
- 10. 如何從PhoneGap中的SD卡讀取文件?
- 11. 如何使用SharedPreferences讀取SD卡中的配置文件?
- 12. 如何從SD卡讀取原始文本文件?
- 13. 如何從SD卡讀取文件並顯示文本?
- 14. 如何從SD卡文件讀取文本?
- 15. 如何在android中讀取pdf文件?
- 16. 如何在SD卡中列出文件?
- 17. 從SD卡上的文件中讀取顯示文字信息
- 18. Android UIAutomator - 在運行時讀取SD卡上的文本文件
- 19. 在webview的幫助下從sd-card中讀取pdf文件
- 20. 如何刪除SD卡中的文件?
- 21. 如何保存SD卡中的文件?
- 22. 如何挑選SD卡中的文件?
- 23. 在Samsung Galaxy S sd卡上讀取和寫入文本文件
- 24. 我怎樣才能加載我的pdf文件從SD卡
- 25. 如何獲得動態讀取文件和從SD卡寫入文件
- 26. 如何從保存在SD卡中的json文件中讀取數據?
- 27. android,從SD卡中讀取xml文件中的值
- 28. 從android中讀取SD卡中的特定文件
- 29. 嘗試從其他語言的SD卡讀取文本文件
- 30. 如何在Android中讀取PDF文件以及如何讀取android中pdf文件中的索引?
這不會顯示在TxtView PDF文件的內容。 – greenapps
看看這個問題,以顯示它在textView http://stackoverflow.com/questions/25739313/how-can-i-display-a-pdf-document-into-a-textview –