How do I detect that there is an incoming phone call in a Javascript Windows 8.1 project? Note, I don't want to interfere with the phone call, I just want to stop the audio my app is currently playing so that that doesn't play while the phone call is happening. My audio is communications audio and is mixing with the phone call audio when a call comes in.
I found a solution that was acceptable for this app's requirements. When the app is obscured by some system UI such as the phone call UI the WebView fires a blur event on window. So setting up a listener like so :
$(window).bind("blur", function () {
//Do something
});
Allowed me to stop the app communications audio and therefore prevent it mixing with the phone call audio.