In my Cordova android app I have a link like this
<a href = "tel:011123456789">Click to Call</a>
This click to call link is working in IOS as expected, but in Android the click is preventing by something like
11-26 11:13:00.565: D/WebCore(18944): uiOverrideUrlLoading: shouldOverrideUrlLoading() returnstrue
this is my log cat result when clicked on the phone number link and the redirection is not working.
Also i tried javascript click to override the redirection, but that also not worked. Please help me to find a solution.
I am using Cordova 3.6
In my Cordova android app I have a link like this
<a href = "tel:011123456789">Click to Call</a>
This click to call link is working in IOS as expected, but in Android the click is preventing by something like
11-26 11:13:00.565: D/WebCore(18944): uiOverrideUrlLoading: shouldOverrideUrlLoading() returnstrue
this is my log cat result when clicked on the phone number link and the redirection is not working.
Also i tried javascript click to override the redirection, but that also not worked. Please help me to find a solution.
I am using Cordova 3.6
Share Improve this question asked Nov 27, 2014 at 6:54 VijayVijay 1131 silver badge5 bronze badges 3- Did you tried window.location.href of that number? – manukv Commented Nov 27, 2014 at 7:01
- Hi manukv.. I have tried .. var href = $(this).attr("href"); var number = href.split(":")[1]; window.location.href = number; but nothing happened – Vijay Commented Nov 27, 2014 at 7:04
- Did you gve white listing access in your config.xml? – manukv Commented Nov 27, 2014 at 7:06
1 Answer
Reset to default 22This issues is may due to the cordova whitelist permission issue. You can specify the access in your Config.xml file like
<access origin="tel:*" launch-external="yes" />
In Cordova 3.6.3 update there are some security update.
The security fixes involves creating a new whitelist for non http/s protocols. If your application uses other protocols besides http:// and https://, such as sms:, mailto:, geo:, etc., then you will need to make some configuration changes to add these protocols to the whitelist.
<access origin="tel:*" launch-external="yes"/>
<access origin="geo:*" launch-external="yes"/>
<access origin="mailto:*" launch-external="yes"/>
<access origin="sms:*" launch-external="yes"/>
<access origin="market:*" launch-external="yes"/>
add these following to your Config.xml
Just read more Cordova-Android Security Update