我使用插件inappbrowser在移动应用程序上打开一些链接,如tel,website。 当我使用phonegap developper进行预览时,它的工作正常 但是,当我在phonegapbuild上构建它并在我的手机上将它设置为无效时(插件)。我点击链接但它没有打开... 我在论坛中尝试了很多解决方案,但它不起作用 可以帮助我吗?
如果我需要添加平台android以使其工作?或者我不需要因为phonegap build会单独完成。
非常感谢你。
config.xml <access origin="*"/> <access origin="tel:*" launch-external="yes" />
index.html : <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.open = cordova.InAppBrowser.open;
}
</script>
<script src="cordova.js"></script> detail.html :
<button class="button button-block button-positive" ng-click="open()">
{{number.tel}}
</button>
controller.html for detail.html :
$scope.open = function()
{
var test = $scope.number.tel;
if(test =='A') {
window.open('tel:01234567833');
}
else if(test == 'B'){
window.open('tel:0456789122')
}