在离子型中,如何检测来电 [英] In ionic, how to detect incoming call
问题描述
打开离子应用程序时,如何检测来电并获取号码。我们希望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屋!