最近在帮公司做一个预约订购的手机app项目,该项目要调用Android手机的拨打电话功能,但是发现通常我们在网页中所用的方法不起作用,如下:
1 <a class="button button-full button-positive" href="tel:15288030215">拨打电话</a>
通过我在网上的几番搜索,终于找到了解决方法
解决方法是在项目config.xml中添加
1 <access origin="tel:*" launch-external="yes" />
这样我们就可调用拨打电话的接口了
iOS实现方法需要借助插件,请参考本文章,由于该文章纯英语,不懂英语者慎入!
http://rickluna.com/wp/2012/02/making-a-phone-call-from-within-phonegap-in-android-and-ios/