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 displays as the caller in the message list and when a log is 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()
          Returns the contact list phone number for this caller ID.
Category: Signed  BlackBerryContact getContact()
          Returns the contact associated with this phone call log.
Category: Signed  String getName()
          Returns the name associated with this caller ID.
Category: Signed  String getNumber()
          Returns the original number for this caller ID.
Category: Signed  String getType()
          Returns the type of the caller ID as stored in the contact list.
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 contact list, then all the information about the contact is transferred to this object. If not, 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()
Returns the name associated with this caller ID.

Returns:
The caller ID name; returns null if the number specified at creation has no associated entry in the contact list.
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()
Returns the original number for this caller ID.

Use this method to retrieve the original phone number given this object when it was created. If the caller has an associated entry in the contact list, this number might be in a different format than the phone number in the contact list. For example, if this caller ID is created with the raw number "5550100", and the associated contact from the contact list has the number "(519) 555-0100", then this method returns the String "5550100", while the method PhoneCallLogID.getAddressBookFormattedNumber() returns the String "(519) 555-0100".

Returns:
The original phone number provided to this object's constructor, or an empty String if null is provided to this instance of PhoneCallLogID.
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

getContact

public BlackBerryContact getContact()
Returns the contact associated with this phone call log. 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

getAddressBookFormattedNumber

public String getAddressBookFormattedNumber()
Returns the contact list phone number for this caller ID.

If a phone number in the contact list matches the raw phone number for this PhoneCallLogID, the contact list phone number is returned, otherwise, the raw phone number is returned.

Returns:
If the identified caller is in the contact list, this method returns the number from the contact, otherwise the raw number is returned. If this PhoneCallLogID object was created with a null raw number, this method returns an empty String.
Throws:
SecurityException - if the device is locked or if the contact lists are protected.
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()
Returns the type of the caller ID as stored in the contact list.

If there is a phone number in the contact list that matches the raw phone number from this PhoneCallLogID, then the type of the number (for example, home, work, etc.) is returned. If not, a default type is returned (that is, 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 in the phone log screen (if the number had an associated name in the first place). It does not override the data in the contact list.

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.