How to detect with PhoneGap on iOS if call is made or not

北慕城南 提交于 2019-12-08 01:10:36

问题


When using the telprompt intent on iOS like

window.location = 'telprompt://' + phoneNumber

the user gets prompted to either call the number or cancel. Is there a way to know which of the two actions the user has made?

Looking at the PhoneGap docs the "startcallbutton" event is only supported on BlackBerry.


回答1:


All you can do is listen for the pause event.

document.addEventListener("pause", yourCallbackFunction, false);

This event will be fired when there is an incoming call or starting a call.

or you could look into the phone listener plugin and try to write it for iOS https://github.com/devgeeks/PhoneListener



来源:https://stackoverflow.com/questions/14425348/how-to-detect-with-phonegap-on-ios-if-call-is-made-or-not

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!