-1

I have requirement to view .doc file inside android app, I have gone through many related post but still not clear what to do.

I have tried :

  1. aspose word api for android I got api for creating .doc file but there is not a specific method to view .doc file.

  2. I gone through apache POI but there is i have to write function for render content.

  3. Embedding .doc inside Webview Does not work for local files.
  4. Olivedoc Library is missing.

Please suggest me if there is any library for .doc file same as pdfViewer for PDF.

Thanks.

Amar1989
  • 502
  • 1
  • 3
  • 17
  • Android itself does not support rendering .doc file "out of the box". You will need an app that can do it for you, so that you can use it's Activity using Intent to open '.doc'. Do you have such app installed on Device? – AADProgramming Feb 05 '15 at 11:05
  • I have requirement to open .doc file inside app context only.. I cann't use Intent to open .doc – Amar1989 Feb 06 '15 at 05:32
  • @Amar are you able to do this?i also need same code..any help appreciated. – user Apr 28 '15 at 19:05
  • @User 10 nope.. I converted doc to html then loaded in webview – Amar1989 Apr 29 '15 at 05:29
  • @Amar can you please share sample code or class for doc to html i need urgent – user Apr 29 '15 at 05:52

1 Answers1

1

Look here. AFIK there is no library for rendering such files in android (Correct me if I'm wrong). You have to create an intent to open your file in an external app, as described in the linked question.

If you want to render the new .docx or OpenOffice .odp files, there are various libraries (search on github).

I know this is not what you want to hear, but there does not seem to be any way to do what you want. (BTW, WebView does work for local files, but cannot render .doc files.)

Community
  • 1
  • 1
Jonas Czech
  • 12,018
  • 6
  • 44
  • 65