Software Archive
Read-only legacy content
17061 Discussions

Open Local PDF - Android

Rich_S_
Beginner
441 Views

Hi,

I have a PDF file stored locally on the android device file system.  In I-OS it works great you can just do a window.open.

But, android is more complicated.

Currently, the only thing that sorta works for me in android is:

intel.xdk.device.launchExternal(wfilepath); 

I say sorta works because if your "default" application (like adobe reader) gets uninstalled, the launchexternal stops working (rather than ask you for a new default viewer).

I haven't been able to get any of these plugins to work:

cordova-plugin-fileopener
cordova-plugin-file-opener2
cordova-open
cordova-plugin-openfilenative

I considered using the PDF.js, but that is way too roll your own for me...

What is the best practice?

Thanks in advance,

Rich

0 Kudos
1 Reply
Pamela_H_Intel
Moderator
441 Views

Are you building with Android or Android-Crosswalk? The native webview in Android is often not optimal, that is why we offer the Crosswalk build.

0 Kudos
Reply