当前位置: 动力学知识库 > 问答 > 编程问答 >

android - how to make a phone call on click automatically without redirecting to dialer pad in ionic framework?

问题描述:

<ion-content>

<div class="item item-button-right ng-click="CallingTel({{user.phone1}})">

<h2><b>Mobile No.</b></h2>

9999999999

<button class="button button-positive">

<i class="icon ion-ios-telephone" ></i></button>

</div></ion-content>

The above fragment of code is from HTML page which has Phone call button.

The below fragment of code explains about functionality of Phone calling functionality.

angular.module('starter.PhoneController',[])

.controller('PhoneCtrl',function($state,$scope,$rootScope)

{

$rootScope.home = true;

$rootScope.telnumber1 = " 9999999999";

$scope.CallingTel = function(tel) {

window.location.href = 'tel:'+ $rootScope.telnumber1;

}

});

I have even added the "<access origin="tel:*" launch-external="yes" />" code in config.xml. Can anyone give me the solution on how to automatically bypass call without displaying the dialer pad?

分享给朋友:
您可能感兴趣的文章:
随机阅读: