Android 在爱奥尼亚框架中,如何在不重定向到拨号板的情况下自动点击拨打电话?
我甚至在Android 在爱奥尼亚框架中,如何在不重定向到拨号板的情况下自动点击拨打电话?,android,ionic-framework,Android,Ionic Framework,我甚至在config.xml中添加了“”代码。有谁能告诉我如何在不显示拨号板的情况下自动绕过呼叫的解决方案吗? angular.module('starter.PhoneController',[]) .controller('PhoneCtrl',function($state,$scope,$rootScope) { $rootScope.home = true; $rootScope.telnumb
config.xml
中添加了“
”代码。有谁能告诉我如何在不显示拨号板的情况下自动绕过呼叫的解决方案吗?
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;
}
});
你需要在两个地方添加这一行,项目名称/config.xml和项目名称/platforms/android/res/xml/config.xml试试这些示例代码,它对我有用……如果没有,我将为你上传一个示例项目
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;
}
});
<access origin="tel:*" launch-external="yes" />