Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cordova: external browser opened for content src

I'm building an very simple cordova app to do one thing: open an web url with the webview.

So I made the following change in config.xml

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

It works fine with iOS emulator. Then I tried to build with build.phonegap.com. Installed resulting APK on my phone. But when running the application, it asks me to pick an external browser straight away.

What went wrong?

like image 852
lang2 Avatar asked Sep 13 '25 19:09

lang2


1 Answers

I've played around a bit, and at least for google, adding the following to the access-origin helped:

<access origin="*" launch-external="no"/>

Perhaps this helps for you, however, I still have the issue for my own site :(

Edit In addition, these have solved my problem:

<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" launch-external="no"/>
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />

(The whitelist-plugin was installed automatically for me when I used the command line "cordova create")

like image 101
Stephanie Peters Avatar answered Sep 16 '25 09:09

Stephanie Peters