0

After the creation of my application, I add this in my config file:

...
<content src="http://www.mywebsite.com" />
...

I launch the android version of my application on build.phonegap.com. My application is normally installed with the launch page of my website, until now everything is good.

The problem is that if I click on a link, it does not open in the application but in a browser!

kaay
  • 41
  • 5

1 Answers1

0

If you want "www.mywebsite.com" to open within your phonegap application you will need to direct the link to point to an iframe. You can make the iframe as follows.

<iframe src="http://www.mywebsite.com"></iframe>

An example of a full screen iframe is below.

<iframe src="http://www.mywebsite.com" style="border: 0; position:absolute; top:0; left:0; right:0; bottom:0; width:100%; height:100%">

You could direct your user to a page within your application that contains a full screen iframe and they will view your website as if they never left your app.

Tim
  • 1,606
  • 2
  • 21
  • 42
  • i can have home page on my application, without iframe, but all link in this not to be able to open in same app, but in default browser. – kaay Feb 04 '16 at 14:15