External URL's 'replacing' app
I have an HTML5 resource I have uploaded which builds successfully apart from one thing, any links to external sites open within the app without any controls to close them and return to the app itself. It’s like the app is being replaced by the external website.
I’ve got the inappbrowser selected in “cordova plugins” in the project section and have added the following to config.xml with no change in the behaviour:
<allow-intent href=“http:///” />
<allow-intent href=“https:///” />
<allow-intent href=“tel:" />
<allow-intent href="sms:” />
<allow-intent href=“mailto:" />
<allow-intent href="geo:” />
Does anyone know where I might be going wrong?
You could try setting the
targetargument of the
This can be used to open in the inapp browser or in the system browser.
@emccorson thanks for the reply. Unfortunately _blank and _system both have the same result.
window.open(“http://www.bbc.co.uk”, “_blank”, “location=yes”); simply replaces the app in ios with no options to close. I’ve even tried adding the tooldbar argument like this: window.open(“http://www.bbc.co.uk”, “_blank”, “location=yes " toolbar=yes” toolbarposition=top" ); but again it just opens in the app itself with no way to close.
This might be obvious, but are you sure you are using the inappbrowser open method? (you need to replace window.open with cordova.InAppBrowser.open)
Yup. The only time the links work is if they’re window.open and have _self instead of _blank.