views:

1745

answers:

4

Hi guys, I'm trying to programmatically reject a call on a BlackBerry, with Java + JDE. I'm intercepting the callIncoming event, and in there I need to do something to reject a call from a specific number.

Does anyone know how to do that? Thanks.

+2  A: 

I couldn't find an API for directly rejecting the call in progress. However, you could explore a hack where you inject a keypress of the Hangup/Disconnect button (see EventInjector).

As to determining the phone number, you could use Phone.getCall(callId).getDisplayPhoneNumber() or Phone.getActiveCall().getDisplayPhoneNumber().

Alexander
Sounds like a "good" hack :) Just curious - don't do Blackberry since I develop on WM - but, do you have to make sure you send the "hangup-button" to the correct window, and does this not matteR?
Israr Khan
A: 

There is no other way than the EventInjector. The "security" layout of the BlackBerry API does not allow to hang up / reject a call. We tried to find a solution for this issue for 2 years.

kozen
A: 

Using the incoming call listener, and notification APIs you can reject a call programmatically.

There is a topic discussing it on the blackberry developer forums, you can find it here

Noctrine
A: 

try this

How to disconnect a call in blackberry

Vivart