在离子型中,如何检测来电 [英] In ionic, how to detect incoming call

查看:84
本文介绍了在离子型中,如何检测来电的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

打开离子应用程序时,如何检测来电并获取号码。我们希望iOS和android都具有此功能。



已经搜索了此功能,我们发现的答案似乎已经过时了。

解决方案

https://github.com/renanoliveira/cordova-phone-call-trap



知道这仅适用于Android而不适用于iOS,因为应用程序已在iOS中进行了沙箱处理。来电时会被调用的事件。


When an ionic app is open, how to detect for a incoming call and get the number. We would like to have this feature for both ios and android.

Have searched for this feature, the answers we found seems outdated.

解决方案

There actually is a plugin for this at https://github.com/renanoliveira/cordova-phone-call-trap

Do know that this only works with Android and not iOS because apps are sandboxed in iOS.

Alternatively, seeing as its an ionic app, you could use the document listeners "pause" event as that gets called when calls come in.

这篇关于在离子型中,如何检测来电的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆