How to open an external page in the phonegap when clicking?

0

Today I started to develop using PhoneGap, however I came across a problem, which is to click on a link and can not open an external page, as if it were a new activity, how can I perform this procedure only using html, css and javascript Thanks in advance.

    
asked by anonymous 09.02.2016 / 22:54

1 answer

1

It is not advisable to open external pages within the Cordova application itself. If you only need to open external pages, just call the device's default browser by:

navigator.app.loadUrl("seuLink", { openExternal:true } );

In the latter case, if you really need to open an internal page on your Cordova / PhoneGap App, try using iframe. However, as said, this can cause a lot of problems in the way that the App works (% events%, for example, may not work as expected).

PS: Additionally, from Cordova 4.0, the default WhiteList plugin has been implemented. You may need to configure the pages you will open in advance.

Hope it helps. :)

    
20.02.2016 / 16:50