Reputation: 553
I have a html website and would like to use phonegap build to convert to an Android native app. I am trying to use inappbrowser to open the pdf from a link.
My zip contains: index.html config.xml "pdf" (folder that contain pdfs)
index.html:
<a href="#" onclick="javascript:window.open('pdf/test.pdf', '_blank', 'location=yes')";>TESTTEST</a>
config.xml:
<feature name="InAppBrowser">
<param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" />
</feature>
I am using phonegap 3.3 and testing on Samsung Galaxy s2, however the link doesn't do anything. Can someone help me? Thanks!
Upvotes: 1
Views: 894
Reputation: 170
Android's inAppBrowser does not have a pdf viewer so you will not be to show the pdf. Look at the answer here (http://community.phonegap.com/nitobi/topics/inappbrowser_not_loading_pdf_on_android) for how to display a pdf.
Upvotes: 1