net.rim.blackberry.api.phone.phonelogs
Class PhoneCallLogID

java.lang.Object
  extended by net.rim.blackberry.api.phone.phonelogs.PhoneCallLogID

public final class PhoneCallLogID
extends Object

Represents the caller ID information associated with a phone call log.

This is the information that shows up as the caller in the message list and when a log gets opened for viewing.

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

Constructor Summary
Category: Signed PhoneCallLogID(String number)
          Creates a new PhoneCallLogID instance.
 
Method Summary
Category: Signed  String getAddressBookFormattedNumber()
          Retrieves the address-book phone number for this caller ID.
Category: Signed  String getName()
          Retrieves the name associated with this caller ID.
Category: Signed  String getNumber()
          Retrieves the original number for this caller ID.
Category: Signed  String getType()
          Retrieves the type of the caller ID as recorded in the Address Book.
Category: Signed  void setName(String name)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

PhoneCallLogID

public PhoneCallLogID(String number)
Creates a new PhoneCallLogID instance.

The input phone number acts like the identifier for the object. If the number exists in the address book, then all the caller information in the address book gets transferred to this object (name, company, etc.). If not, then a blank object is created with the number as the main identification.

Parameters:
number - Phone number for this caller.
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

getName

public String getName()
Retrieves the name associated with this caller ID.

If the number specified on creation has no associated address book entry, this method null.

Returns:
The caller ID name, or null.
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

getNumber

public String getNumber()
Retrieves the original number for this caller ID.

Use this method to retrieve the original phone number given to this object when it was created. Note that this number may be different in format to the number in an associated address book entry for a known caller. For example, if this caller ID is created with the raw number "8887465", and the associated address book entry for this caller has the number "(519) 888-7465", then the method getNumber() returns the String "8887465", while the method getAddressBookFormattedNumber() returns the String "(519) 888-7465".

Returns:
The original phone number provided to this object's constructor.
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

getAddressBookFormattedNumber

public String getAddressBookFormattedNumber()
Retrieves the address-book phone number for this caller ID.

If a phone number in the address book matches the raw phone number from this PhoneCallLogID, that address-book phone number is returned, otherwise, the raw phone number is returned.

Returns:
If the identified caller is known in the address book, this method returns the address-book number, otherwise the raw number is returned. The method would return an empty string in the case when this PhoneCallLogID object was created with null for raw 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.0.0

getType

public String getType()
Retrieves the type of the caller ID as recorded in the Address Book.

If there is a phone number in the address book that can be matched with the raw phone number from this PhoneCallLogID, then the type of the number (home, work, etc.) is returned. If not, a default type is returned (ie "Phone"). If all else fails, an empty string is returned.

Returns:
A type for the phone number (if known) or an empty string.
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.1.0

setName

public void setName(String name)
Deprecated. 

Sets the name for this caller ID. This method overrides the name as it appears (if the number had an associated name in the first place) in the phone log screen. It does not override the data in the address book.

Parameters:
name - New name for this caller ID.
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





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.