-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 –