Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

BlackBerry Development Advisor
Posts: 15,876
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

End phone call

Quote from the previous forums:


Posts: 3
Registered: Oct, 2007

End phone call
Posted: Apr 3, 2008 6:51 AM
I've read some posts regarding the end of call problem
and all the solutions were to invoke TrackwheelEvent.
My question is: Can i simulate a press of the END button instead of using the TrackwheelEvent?


Guest: levi
Re: End phone call
Posted: Jul 30, 2008 2:45 PM

I'm looking for the same solution.

Pressing the End key is not possible because of security reasons (based on information in some of these posts). So I'm not sure how, but ending a call without using the TrackWheel injection seems to be possible. I've seen that in some commercial applications.

So does anybody know more about this? is there a way to stop a call without using the trackwheel injection which doesn't work for all devices?

Maybe some hidden RIM API or something?

No, the BlackBerry APi set does not provide the ability to programmatically end a phone call.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Posts: 41
Registered: ‎08-05-2008
My Device: Not Specified

Re: End phone call

I was able to successfully end the call on a simulator using the EventInjector injecting the END key.



public void callIncoming(int callId){ EventInjector.KeyCodeEvent ev = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEvent.KEY_DOWN, ((char)Keypad.KEY_END), KeypadListener.STATUS_ALT, 500); EventInjector.invokeEvent(ev); }

 I have never tested it on device



Posts: 120
Registered: ‎07-16-2008
My Device: 9000

Re: End phone call

You can end the call with key injection but these APIs are restricted by default.  By default the user will not get prompted when an application calls key injection, it will simply fail with a controlled access exception.  If you want to use key injection you have to go into Options -> Advanced Options -> Applications, find your application, and change the key injecction security option to allow.
Kurt Zettel | Chief Architect | Metova