Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h2>Outgoing call interception</h2> <p><a href="http://img200.imageshack.us/img200/6927/callinit.png" rel="nofollow noreferrer">call interception http://img200.imageshack.us/img200/6927/callinit.png</a> </p> <ul> <li>create extention of <a href="http://www.blackberry.com/developers/docs/4.5.0api/net/rim/device/api/system/Application.html" rel="nofollow noreferrer">Application</a> for background service</li> <li>implement <a href="http://www.blackberry.com/developers/docs/4.5.0api/net/rim/blackberry/api/phone/PhoneListener.html" rel="nofollow noreferrer">PhoneListener</a></li> <li>use <a href="http://www.blackberry.com/developers/docs/4.5.0api/net/rim/blackberry/api/phone/PhoneListener.html#callInitiated(int)" rel="nofollow noreferrer">callInitiated</a></li> <li>should be <a href="http://na.blackberry.com/eng/developers/javaappdev/codekeys.jsp" rel="nofollow noreferrer">signed</a> before use on device</li> <li>should be tested against <a href="http://rim.lithium.com/rim/board/message?message.uid=185907#U185907" rel="nofollow noreferrer">known issue</a></li> </ul> <p>Code example: </p> <pre><code>import net.rim.blackberry.api.phone.Phone; import net.rim.blackberry.api.phone.PhoneListener; import net.rim.device.api.system.Application; import net.rim.device.api.ui.component.Dialog; public class CatchCall extends Application implements PhoneListener { public CatchCall() { Phone.addPhoneListener(this); } public static void main(String[] args) { new CatchCall().enterEventDispatcher(); } public void callAdded(int callId) { } public void callAnswered(int callId) { } public void callConferenceCallEstablished(int callId) { } public void callConnected(int callId) { } public void callDirectConnectConnected(int callId) { } public void callDirectConnectDisconnected(int callId) { } public void callDisconnected(int callId) { } public void callEndedByUser(int callId) { } public void callFailed(int callId, int reason) { } public void callHeld(int callId) { } public void callIncoming(int callId) { } public void callInitiated(int callid) { Dialog.inform("call initiated"); } public void callRemoved(int callId) { } public void callResumed(int callId) { } public void callWaiting(int callid) { } public void conferenceCallDisconnected(int callId) { } } </code></pre> <h2>Cancel call</h2> <p>You can use event injection to fire Close button press event: </p> <pre><code>public void dropCall() { KeyEvent inject = new KeyEvent(KeyEvent.KEY_DOWN, Characters.ESCAPE, 0); inject.post(); } </code></pre> <p>Don't forget to set permissions for device release: Options => Advanced Options => Applications => [Your Application] =>Edit Default permissions =>Interactions =>key stroke Injection</p> <p>See also<br> <a href="https://stackoverflow.com/questions/1292896/blackberry-simulate-a-keypress-event">BlackBerry - Simulate a KeyPress event</a> </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload