宇筱博客

  • 解决办法
  • 学无止境
  • 记录时光
  • 百宝箱
宇筱博客
点滴记忆,汇聚成海。
  1. 首页
  2. 解决办法
  3. 正文

(拨打电话)Call Number

2017年1月1日 794点热度 0人点赞 0条评论

Call Number

直接从Cordova / Ionic应用程序拨打号码。

Repo(备用): https://github.com/Rohfosho/CordovaCallNumberPlugin

Installation(安装)
1.安装Cordova和Ionic原生插件:

ionic cordova plugin add call-number
npm install --save @ionic-native/call-number

2.添加插件到app's module

Supported platforms(支持平台)

Android
iOS

Usage(用法)

import { CallNumber } from '@ionic-native/call-number';

constructor(private callNumber: CallNumber) { }
...
this.callNumber.callNumber("18001010101", true)
  .then(() => console.log('Launched dialer!'))
  .catch(() => console.log('Error launching dialer'));

Instance Members(实例成员)

callNumber(numberToCall, bypassAppChooser)

拨打电话号码

参数

参数 类型 详情
numberToCall string 要拨打的电话号码
bypassAppChooser boolean 设置为true以绕过应用程序选择器,直接转到拨号器

设置为true以绕过应用程序选择器,直接转到拨号器
**Returns: Promise<any>

作者:待花谢花开
链接:http://www.jianshu.com/p/42566e121c70
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

标签: 暂无
最后更新:2017年1月1日

小渔民

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2025 宇筱博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备15017825号-2