I'm in the process of developing my first mobile app and doing so using a combination of JQuery, Require, Backbone and Underscore and then using PhoneGap to create the packages for the different mobiles. I'm using the PhoneGap Build web site to create the package, and using version 2.1.
Now in my application I go off to the server to retrieve a PDF document of which I get down a Bas64 string representing the PDF document.
I've been testing my app in Chrome as I develop and was simply using the following to display the PDF, which worked OK in the browser:
window.open('data:application/pdf;base64,' + data.binaryPDF);
Now this wasn't a fantastic solution but it at least displayed in the PDF in a new browser window.
BUT thisdidn't work in PhoneGap, it was only displaying the bas64 string in a new window and not actually translating it to a PDF document.
So after crawling the web I discovered ChildBrowser. But alas I can't get it to work, when I try to use window.plugins.childbrowser it does nothing.
This is how I call it:
window.plugins.childbrowser.showWebPage('data:application/pdf;base64,' + aBinaryPDFstr,
{ showLocationBar: false, showAddress: false, showNavigationBar: false });
<gap:plugin name="ChildBrowser" version="~3" />
Is there anything else I should be doing to get this working in my application??? Any help would be much appreciated!!