I notice there already is a thread on this topic: Making Phone Call from App - href="tel:123".
It mentions the whitelist plugin:
So I try to add these code in the config.xml, but it still can not work.
<access origin="tel:*" launch-external="yes" />
<access origin="mailto:*" launch-external="yes" >
<allow-intent href="tel:*" />
HTML:
<div href="tel: 110">call</div>
error:
2015-07-03 00:21:16.231 myParking[27167:1006045] Failed to load webpage with error: The URL can’t be shown
I try to use another plugin, but it still can not work.
HTML:
<span ng-click="onDail($index)">call</span>
----------------------------
JS:
var onSuccess = function(){
console.log("success");
}
var onError = function(){
console.log("fail");
}
$scope.onDail = function(index){
window.plugins.CallNumber.callNumber(onSuccess, onError, $scope.ParkingRecords[index].number);
}
error:
2015-07-03 00:24:09.620 myParking[27308:1007392] fail
So How can I make this work?
ionic: 1.4.3
cordova: 5.0.0