Airprint And Openurl

Hello,

We’re currently working on an application that needs to load a URL from the internet, and allow us to print the opened HTML.

First we tried native.showWebPopup, and native.newWebView

First problem encountered:

You cannot access the native print functions that comes with the browser.

If anyone has a way to make the print functions work using webviews I’d be very much interested on how you got it to work.

Anyway, since we needed to be able to print the site that would be shown, we couldn’t use either of the webviews.

so we moved to system.openURL(url)

We were so happy once we got the page to print (via airprint) using the built-in browser functions,

and then another problem occurred:

It seems that the openURL would only load a cached version of the URL we’d pass to it.

example:

system.openURL(http://oururl.com/currentstatus)

it would open the current status correctly. But after the status is updated and we decide to check the status again, the page that would be loaded would be the previous “currentstatus” page that was initially loaded. Manually hitting refresh on the browser doesn’t even refresh the page.

But if we open the webpage on a regular PC browser, we didn’t seem to have any problems as the correct status would be displayed.

So I ask, is there a way to disable corona from caching the URL it was sent via openURL?

TL;DR:

We need to print an HTML page and openURL helps us do this, but openURL caches the page and we are not getting the latest webpage that should be loaded. Help me please.

Did you ever figure this out? My first thought is to call the url with a random number at the end such as http"//oururl.com/currentstate?id=1234.

Warren

Did you ever figure this out? My first thought is to call the url with a random number at the end such as http"//oururl.com/currentstate?id=1234.

Warren