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.
You should add this line in config.xml to let the app lunch an external app: <access origin="tel:*" launch-external="yes" />
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With