简体   繁体   中英

Android unsafe:tel: with phonegap application

I coded an application with phonegap.

I have a phone numbers list that I receive from a server. when an item from a list is clicked the controller trigers this function:

$scope.call = function(number){
        document.location.href = 'tel:' + number;
    }

on an iPhone it's ok, but on an Android I get:

unsafe:tel:+97235726333

why? Is it a utf-8 encoded problem?

some systems dont take the + in to considerations, i know i have had some issues with that in the past with older projects. one thing you could do is replace the + with 00 two zero's is the same as a plus, which then becomes a full integer without the + which might the the issue with the internal parser.

$scope.call = function(number){
   document.location.href = 'tel:' + number.replace("+","00");
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM