How can we open files like ppt, doc, pps, rtf, etc. in Android?

▼魔方 西西 提交于 2019-12-03 16:56:15

问题


Are there classses in Android that can open different kind of files like pps, ppt, docs, rtf, etc.?

Please provide links.


回答1:


WebView mWebView = (WebView) findViewById( R.id.WebView01);
String pdfurl = ""; // Url of pdf or doc file.

String weblink="http://docs.google.com/gview?embedded=true&url="+pdfurl;    
mWebView.loadUrl(weblink);



回答2:


No, there is no native API provided by android, you can use some third party APIs to read pdf and all.




回答3:


Some of them can open using default activity with ACTION_VIEW. For other we have to external API to open them. But i am not sure which one will definitely open using ACTION_VIEW but you can give a try to them by using URI.

But most important thing as Saurabh Pareek said there is not native classes in android



来源:https://stackoverflow.com/questions/8573825/how-can-we-open-files-like-ppt-doc-pps-rtf-etc-in-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!