3

What is the preferred way to load a remote url as the main page in Phonegap 3 (Cordova 3.1.0+)?

I find that if I just set the tag to the external URL, it will just open in a new Chrome window (on Android.)

If I use the approach described in the accepted answer here then I get the same behaviour - opens in a new window.

Also, I have found that I cannot open self-signed https links at all. If I implement the fix described here then I get a timeout, increasing the timeout value of loadUrlTimeoutValue just results in the app waiting indefinitely.

Ultimately, what I want is to be able to open a self-signed URL directly into an android application. This app does not need to be on the Play store, and does not need to be concerned with the implications of blinding accepting self-signed certs. How can I achieve this?

Community
  • 1
  • 1
Ben Parsons
  • 1,425
  • 1
  • 14
  • 30
  • I am wondering what your intensions are for this? It is common practice to use javascript to interface with serverside code rather than loading an external page into your app. Maybe if you explain the use case we can find a good solution. – Dawson Loudon Jan 20 '14 at 20:48

2 Answers2

0

Maybe an iframe set to full width and height?

Dawson Loudon
  • 6,029
  • 2
  • 27
  • 31
0

I believe the accepting of unsigned SSL certificates for HTTPS is better-covered in this SO answer which appears to have gotten good reviews.

As for the issue of loading a page into main view, I just tested this and it seems to be working to replace the existing WebView (in-app) with the external page.

<a href="#" onclick="var ref=window.open('http://google.com', '_self');">Google (Webview)</a>
Community
  • 1
  • 1
Matt Ray
  • 1,274
  • 1
  • 12
  • 26