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()
          Returns this call's ID.
Category: Signed  String getCallPhoneNumber()
          Deprecated. Use PhoneCall.getPhoneNumber() instead.
Category: Signed  BlackBerryContact getContact()
          Returns the contact associated with this phone call.
Category: Signed  String getDisplayPhoneNumber()
          Returns this call's number string for display in a UI.
Category: Signed  int getElapsedTime()
          Returns this call's current elapsed time.
Category: Signed  String getPhoneNumber()
          Returns the phone number associated with this phone call.
Category: Signed  int getStatus()
          Returns this call's current status.
Category: Signed  String getStatusString()
          Returns this call's current status as a string for display in a UI.
Category: Signed  boolean isOutgoing()
          Determines whether or not 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 multiple 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()
Returns 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()
Returns this call's number string for display in a UI. If a contact list entry is found with a matching phone number, the 'friendly name' (either First/Last or Company name) is 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()
Returns 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

getContact

public BlackBerryContact getContact()
Returns the contact associated with this phone call. All contact lists are searched.

Returns:
A contact object; returns null if a match is not found or if the call is private, unknown, an emergency call, a voice mail, or for SIM startup.
Throws:
SecurityException - if the device is locked or the contact list is protected, or if the application is not given permissions to read or write a Contact.
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 6.0.0

getElapsedTime

public int getElapsedTime()
Returns 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()
Returns 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()
Returns 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 whether or not the current call is an outgoing call.

Returns:
true if this call was initiated by the device, false if the call was received and answered by the 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 (for example, if the 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 multiple 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 the entire list of tones has been added to this call's send queue, false otherwise.
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. Use PhoneCall.getPhoneNumber() instead.

Extracts the phone number from an active 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





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal