Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tel link android not working (Galaxy S5)

Tags:

I'm new to mobile hybrid app development. I have a HTML 5 hybrid app developed in Angular and Ionic where in part of the application i want to launch the native phone app (or a menu of various ways to get to the native phone app) when a user clicks on a phone number. When i view the hybrid app through a browser in my phone, clicking on the links works as expected. However, if i deploy the application to my Samsung Galaxy S5 (via cordova), tapping the links does nothing. I've tried the following syntaxes:

<a href="tel:18888888">tel:18888888</a> <a href="tel:+18888888">tel:+18888888</a> <a href="tel://18888888">tel://18888888</a> <a href="tel://+18888888">tel://+18888888</a> <a href="tel:1-888-8888">tel:1-888-8888</a> <a href="tel://1-888-8888">tel:1-888-8888</a> 

I'm using Cordova 3.6.0 and the Android SDK r23.0.2 windows.

I've googled similar issues but the results are inconsistent.

Has anyone had any luck with this? Seems like a common feature. I must be missing something simple.

like image 909
Robert Taylor Avatar asked Oct 17 '14 19:10

Robert Taylor


2 Answers

You should add this line in config.xml to let the app lunch an external app: <access origin="tel:*" launch-external="yes" />

like image 80
Amine OUAFI Avatar answered Sep 30 '22 22:09

Amine OUAFI


As Commented above:

Cordova 3.6.0 introduces a second whitelist, for restricting which URLs are allowed to launch external applications. Cordova 3.6.0 Whitelist Guide So you need to add explicitly in the config.xml:

<access origin="tel:*" launch-external="yes" />  <access origin="geo:*" launch-external="yes" />  

Originally posted here.

Thanks

like image 45
Pratik Butani Avatar answered Sep 30 '22 23:09

Pratik Butani