问题
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