WebView 僅封裝瀏覽器內核,原生不支持 直接打開 Word/Excel/PPT/PDF。
https://docs.google.com/gview?embedded=true&url=文件URL(需外網可訪問文件)。MuPDF、Pdfium 原生渲染 PDF;OnlyOffice、Office 365 在線預覽 API。Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(uri, "application/pdf"); startActivity(intent); 調用系統/第三方 App 打開。推薦:簡單場景用 Google Docs Viewer 或意圖跳轉;離線/私有文件集成 MuPDF/Pdfium 或服務端轉 HTML。