2

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.

Sönke Rohde
  • 300
  • 1
  • 9

1 Answers1

-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

Clinton Ward
  • 2,441
  • 1
  • 22
  • 26
  • 1
    The "pause" event is a workaround but not accurate since the user could also have pressed the home button. Seems like it's required to write an iOS plugin or wait for PhoneGap to expose this event. – Sönke Rohde Jan 21 '13 at 15:24
  • I think this is the only event that is going to be used. Many people have asked on the phonegap google group and thats what I found. – Clinton Ward Jan 21 '13 at 15:27