【发布时间】:2018-11-07 14:05:25
【问题描述】:
我通过PhoneGap Build服务构建了一个Android APP(https://build.phonegap.com/apps)
我已经将这些添加到 config.xml 中
<plugin name="cordova-plugin-inappbrowser"/>
<access origin="*"/>
<access origin="tel:*" launch-external="yes"/>
<access origin="sms:*" launch-external="yes"/>
<plugin name="cordova-plugin-whitelist"/>
<allow-intent href="http:///"/>
<allow-intent href="https:///"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="geo:*"/>
并将这些添加到我的 HTML 文件中
<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.open = cordova.InAppBrowser.open;
}
</script>
终于……我试过了
<a href="#" onclick="cordova.InAppBrowser.open('https://www.google.com/', '_system');return false;">link</a>
和
<a href="#" onclick="window.open('https://www.google.com/', '_system');return false;">link</a>
我还尝试了在一些答案中找到的选项“location=yes”
但它们都不起作用....我错过了任何步骤吗?
PhoneGap Android 版本:cli-6.5.0、6.1.2 和 Android 版本:7.1.1
【问题讨论】:
标签: android phonegap-build phonegap inappbrowser