08-01-2010 09:13 AM - edited 08-01-2010 09:15 AM
I'm new to Blackberry development. I hope my question is not so trivial.
I want to develop a call management application. My application needs to monitor incoming call reject events. Unlike call blocker applications, I don't want to reject incoming calls automatically. Rather, I want my application to be triggerred when the user pressed the Reject button. Is it possible to different the scenarios?
I tried the PhoneListener. I triggers the same callDisconnected method for both scenarios. I also tried PhoneCallLogListener. It also specifies the same missed call type for both scenario.
I also saw NotificationsManager. But I couldn't figure how to use the api, which sourceId / consequenceId to use.
08-01-2010 10:41 AM
There is no API to reject a call.
However, there is the "reject" or "ignore" button already on the call screen. Most folks use event injection to push the "redphone" key programmatically.
08-01-2010 11:21 AM
Hi RexDoug, thanks for your reply. But this does not answer my question. I don't want to reject the incoming call. Rather, somehow figure out the user rejected the incoming call.
08-01-2010 11:37 AM
OK -understand better now.
AFAIK, there is no way to detect this event. Only the app with focus can monitor the key pressess, In the case above, the phone app has the focus.
Maybe you can get *your* screen to come up over the phone app - not sure if this is possible, but I seem to recall several discussions along these lines on the forum.
08-02-2010 04:59 AM - edited 08-02-2010 05:02 AM
You can use the PhoneLogListener. When a call is added check if it is inbound or outbound call, and the duration, if it is inbound (PhoneCallLog.TYPE_RECEIVED_CALL) and the duration is 0 then it is a rejected call.
Edited: It behaves same to missed and rejected calls.