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.
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.
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()
.
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.