Welcome!

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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums on April 1st. BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com


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

End phone call

Quote from the previous forums:


robyb

Posts: 3
Registered: Oct, 2007

End phone call
Posted: Apr 3, 2008 6:51 AM
 
Hello,
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?
Thanks.

 


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

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.
Highlighted
Developer
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

 

 

Developer
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
www.metova.com