Computer Science Canada

Android Webview and PDFs

Author:  andrew. [ Tue May 31, 2011 2:02 pm ]
Post subject:  Android Webview and PDFs

Hey all,

So I'm currently working on an app for Android which allows users to access a resource bank. Right now, it accesses everything through the webpage via WebView. Everything works fine so far. There's one problem though: once you navigate to a file and click on the link, WebView cannot open it. Examples of files are Word documents, PDFs, Powerpoint files, etc. Do any of you know a way that I can access these files inside of my app? (Doesn't have to be through WebView)

Also, I thought of using the Google Docs' PDF reader to handle PDF files but the resource bank requires you to be logged in to download files. And even if that worked, the links to the files aren't direct. They redirect you to the file when you click it.

It would be great if I could get some help at least opening PDF files. I can contact some people regarding the server side stuff like redirection. If you guys need any other details, please let me know.

Thanks!

Author:  2goto1 [ Tue May 31, 2011 10:32 pm ]
Post subject:  RE:Android Webview and PDFs

I haven't done that, but this might be relevant: http://stackoverflow.com/questions/2883355/how-to-render-pdf-in-android/

Author:  andrew. [ Thu Jun 02, 2011 9:50 am ]
Post subject:  RE:Android Webview and PDFs

Thanks, I'll look into this. I'm assuming this won't work in the emulator because the emulator doesn't have Quickoffice (I think). It's so weird that Google wouldn't include the Chrome PDF reader in the browser and WebView.


: