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.
你应该在config.xml中添加这一行,让app app午餐一个外部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
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.