0

I have a doc/ppt/xls file located in my sd card. I want to open it without any third party app (i.e within my app itself) using webview. Though I am able to open documents by embedding it in google docs url like -

http://docs.google.com/gview?embedded=true&url=[filelinkHere]

But how to open a file located in internal or external storage in webview ?

Also, Suggest me any third party ALL-IN-ONE library for android to view all types of documents. I have tried ASPOS but it has few unresolved bugs and APACHE-POI is difficult to use.

pravingaikwad07
  • 482
  • 1
  • 7
  • 24
  • Google docs can open the docs hosted on google drive. You cannot open a word file stored on your hard drive into google docs unless you upload it to the drive. – Prerak Sola Aug 29 '16 at 11:19

2 Answers2

1

I had the same issue few days ago .

i found Android PdfViewer best to view PDF files and Android PdfMyXml best to create pdf files in android.

For working with Word and Excel as a most reliable answer I suggest you to take a look at OliveDocLibrary .

If your documents are in cloud so there is an alternative way to display docx,pptx,pdf and such formats with a combination of Webview and googleDoc.

You might find other possible solutions in server-side machines or maybe a creative way!

Hope it help

Community
  • 1
  • 1
Siamak
  • 1,689
  • 1
  • 17
  • 26
  • OliveDocLibrary . - [link](https://code.google.com/p/android-office-demo/downloads/list) this link is not working. Could you please provide me any other alternate link or suggestions ? – pravingaikwad07 Dec 21 '16 at 07:12
  • Olive library gone now for a reason! I suggest you to try a different way now. Please share with us if you find any thing useful. Thanks – Siamak Mar 03 '17 at 11:57
0

You can integrate some library project to your project with which you can open the pdf file inside your app.

Reference : https://github.com/tekinarslan/AndroidPdfViewer https://github.com/JoanZapata/android-pdfview

Nitesh
  • 3,868
  • 1
  • 20
  • 26