String googleDocsUrl = "http://docs.google.com/viewer?url="+urlPDF;
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(googleDocsUrl), "text/html");
startActivity(intent);
但它會保留當前活動,並在Google文檔網址中打開它。我想在我目前的webview活動中打開它。請建議,如果可能的話提供一個例子。使用webview讀取文件?
這我知道,但它再次在谷歌文檔urlie在新的活動開幕。 –
我不明白你說什麼? –
感謝您的幫助:) –