如何在iOS上使用PhoneGap进行检测 [英] How to detect with PhoneGap on iOS if call is made or not

查看:123
本文介绍了如何在iOS上使用PhoneGap进行检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在iOS上使用telprompt意图时

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?

查看PhoneGap文档startcallbutton事件只支持BlackBerry

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

推荐答案

所有你可以监听暂停事件。

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.

或者你可以看看手机侦听器插件并尝试为iOS编写
https://github.com/devgeeks/PhoneListener

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

这篇关于如何在iOS上使用PhoneGap进行检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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