net.rim.blackberry.api.phone
Class PhoneCall

java.lang.Object
  extended by net.rim.blackberry.api.phone.PhoneCall

public class PhoneCall
extends Object

Represents an active phone call.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

Field Summary
Category: Signed static int STATUS_CONNECTED
          Call is connected.
Category: Signed static int STATUS_CONNECTED_MUTED
          Call is connected, but muted.
Category: Signed static int STATUS_CONNECTING
          Call is currently connecting, but not yet connected.
Category: Signed static int STATUS_DISCONNECTED
          Call is disconnected.
Category: Signed static int STATUS_HELD
          Call is being held.
 
Method Summary
Category: Signed  int getCallId()
          Retrieves this call's ID.
Category: Signed  String getCallPhoneNumber()
          Deprecated. This API is redundant to getPhoneNumber.
Category: Signed  String getDisplayPhoneNumber()
          Retrieves this call's number string for display in a UI.
Category: Signed  int getElapsedTime()
          Retrieve this call's current elapsed time.
Category: Signed  String getPhoneNumber()
          Retrieves the phone number associated with this phone call.
Category: Signed  int getStatus()
          Retrieves this call's current status.
Category: Signed  String getStatusString()
          Retrieves this call's current status as a string for display in a UI.
Category: Signed  boolean isOutgoing()
          Determines if the current call is an outgoing call.
Category: Signed  boolean sendDTMFTone(char tone)
          Adds a DTMF tone to this call's send queue.
Category: Signed  boolean sendDTMFTones(String tones)
          Adds a number of DTMF tones to this call's send queue.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

STATUS_CONNECTED

public static final int STATUS_CONNECTED
Call is connected.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

STATUS_CONNECTED_MUTED

public static final int STATUS_CONNECTED_MUTED
Call is connected, but muted.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

STATUS_CONNECTING

public static final int STATUS_CONNECTING
Call is currently connecting, but not yet connected.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

STATUS_DISCONNECTED

public static final int STATUS_DISCONNECTED
Call is disconnected.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

STATUS_HELD

public static final int STATUS_HELD
Call is being held.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0


Method Detail

getCallId

public int getCallId()
Retrieves this call's ID.

Returns:
ID for this call.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getDisplayPhoneNumber

public String getDisplayPhoneNumber()
Retrieves this call's number string for display in a UI. If an address book (Contacts) entry is found with a matching phone number, the 'friendly name' (either First/Last or Company name) will be returned.

Returns:
a String containing the display phone number for this call
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getPhoneNumber

public String getPhoneNumber()
Retrieves the phone number associated with this phone call.

Returns:
a String representing the phone number
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0

getElapsedTime

public int getElapsedTime()
Retrieve this call's current elapsed time.

Returns:
Elapsed time for this call.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getStatus

public int getStatus()
Retrieves this call's current status.

Returns:
One of the STATUS_* values describing the state of this call.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getStatusString

public String getStatusString()
Retrieves this call's current status as a string for display in a UI.

Returns:
String version of this call's current status.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

isOutgoing

public boolean isOutgoing()
Determines if the current call is an outgoing call.

Returns:
True if this call was initiated by this device; otherwise, the call was received and answered by this device.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

sendDTMFTone

public boolean sendDTMFTone(char tone)
Adds a DTMF tone to this call's send queue.

Parameters:
tone - DTMF tone to add to this call's send queue. Valid DTMF tone characters are 0-9 inclusive, ‘#’, and ‘*’.
Returns:
true if the tone has been added to this call’s send queue; false if not, which occurs if this call is not active (ie. this call is disconnected).
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

sendDTMFTones

public boolean sendDTMFTones(String tones)
Adds a number of DTMF tones to this call's send queue.

Parameters:
tones - List of DTMF tones to add to this call's send queue.
Returns:
True if entire list of tones has been added to this call's send queue; otherwise, false.
Throws:
NullPointerException - if a null parameter is specified.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getCallPhoneNumber

public String getCallPhoneNumber()
Deprecated. This API is redundant to getPhoneNumber.

Extract the phone number from an active phone call.

Returns:
phone number
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.7.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.