I want to invoke speakerphone from my application when a call is connected.
I tried Event injection:
Code:
EventInjector.KeyCodeEvent pressEndKey = new EventInjector
.KeyCodeEvent( KeyCodeEvent.KEY_DOWN, (char)Keypad
.KEY_SPEAKERPHONE, KeypadListener.STATUS_NOT_FROM_KEYPAD, 100);
EventInjector.KeyCodeEvent releaseEndKey = new EventInjector
.KeyCodeEvent( KeyCodeEvent.KEY_UP, (char)Keypad
.KEY_SPEAKERPHONE, KeypadListener.STATUS_NOT_FROM_KEYPAD, 100);
EventInjector.invokeEvent(pressEndKey);
EventInjector.invokeEvent(releaseEndKey);
But its invoking the option MUTE instead of speakerphone....
Please suggest a solution to invoke speakerphone....