cordova 实现拨打电话:

  第一步配置conf.xml
在cordova中所有的URL Schemes 都是服从于白名单的,所以a tel 在这无法正常使用。解决方法是在项目config.xml中添加
<access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <allow-intent href="market:*" /> <access origin="tel:*" launch-external="yes"/>

 第二步:

<a href="tel:1835494870"> 拨打电话</a>


Ok 了
结束。。。。。。。。。。。。。。。。。。。

 

相关文章:

  • 2022-12-23
  • 2021-12-31
  • 2022-01-17
  • 2022-01-29
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-21
  • 2021-10-01
  • 2022-12-23
  • 2021-08-11
  • 2021-08-14
相关资源
相似解决方案