Detecting earphone button press

126 views Asked by At

I am developing a VOIP app based on the VoipChatterbox sample app project and I need to manipulate the headset button click.

I see that, during an active call, when I press the button on the earphone, I get a CallEndRequested event and I need to call NotifyCallEnded within 5 seconds.

But I need a different behavior for my app. I need to simply turn the microphone off / on (toggle behavior) when the user presses the headset button. (This requirement might seem odd, but that's what make sense in the context of my application). How can I achieve this behavior?

To summarize :

Is there any other event to understand that user has pressed the earphone button? Is there a way to override the behavior that NotifyCallEnded should be called in five seconds when CallEndRequested event is fired?

0

There are 0 answers