Window.onkeyspkr when app is not in focus

We’re looking for a way to disable the digium speakerphone button due to problems with sound in/around the cubicles. Using the window.onkeyspkr event handler I have it such that the speakerphone button is hijacked while a app is in focus. However, the moment the app is placed into the background, the window.onkeyspkr handler is skipped and the phone goes back to dial tone. Is there a means to use the window.onkeyspkr while at the idlescreen?

thanks in advance!



There’s a thread about this here:

and I also have an e-mail thread in my Inbox about this.

Perhaps you’re related to the same original query?

If your application is not in the foreground, it will not control the keys. Trying to build an app to foreground itself constantly through all of the various state changes that can occur for outgoing and incoming calls (where you’re trying to force the normal function of the phone into the background) is not going to end well. I suspect it’s going to frustrate users.