PhoneGap - inappbrowser not working - Need to open the URL inside the app

蹲街弑〆低调 提交于 2019-12-11 02:25:17

问题


There are so many questions related to this like, Phonegap - How to open external link inside the app .

I want to open the website URL inside the app (not asking which browser need to open) when open the app.

But it asked which browser you need to open.... What I have done mistake here? (This is working fine on emulator, but when I install it to android phone it asked which browser......)

My config file

<access origin="*" />
<plugin name="cordova-plugin-whitelist" spec="~1.3.2" />
<plugin name="cordova-plugin-inappbrowser" spec="~1.7.2" />

Index File

<script>
    window.open('http://example.com', '_self', 'location=no,hidden=yes,closebuttoncaption=Done,toolbar=no'); 
</script>

回答1:


You have to configure the whitelist plugin to allow the internal navigation of external sites, you can do it with allow-navigation tag like this:

<allow-navigation href="*" />


来源:https://stackoverflow.com/questions/47547852/phonegap-inappbrowser-not-working-need-to-open-the-url-inside-the-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!