1.关于打电话在html中可以很方便的实现拨打电话先在config.xml中添加:
<access origin="tel:*" launch-external="yes">

2.然后在html中这样写:
<a href="tel:10086">拨打10086</a>
3.如果编译运行的时候报错

则在config.xml中添加代码
<allow-navigation href="*"/>
发短信的插件
关于发短信,是使用的ng-cordova的插件$cordovaSMS:
cordova plugin add https://github.com/cordova-sms/cordova-sms-plugin.git
记得相应的要在app.js中依赖ng-cordova,在发送短信的控制器中依赖$cordovaSms。
网友评论