SHOW Signed
 

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

java.lang.Object
  |
  +--net.rim.blackberry.api.phone.phonelogs.PhoneLogs

public final class PhoneLogs
extends Object

A container to maintain a list of CallLog objects that together represent the logs for phone calls stored in the message list.

Call logs are stored in two different folders: One for missed calls, and one for all other calls.

Once you have retrieved an instance of the PhoneLogs object using the getInstance() method, you can use the object to add, delete, or swap CallLog objects from the log.

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:
JDE 4.0.0

Field Summary
 Category: Signed static long FOLDER_MISSED_CALLS
          Folder ID for the missed call folder.
 Category: Signed static long FOLDER_NORMAL_CALLS
          Folder ID for other calls.
 
Method Summary
 Category: Signed  void addCall(CallLog call)
          Adds a call to the log.
 Category: Signed static void addListener(PhoneLogListener listener)
          Registers PhoneLogListener instance with the system
 Category: Signed  CallLog callAt(int index, long folderID)
          Retrieves a particular call from the log by index.
 Category: Signed  void deleteCall(int index, long folderID)
          Deletes a call from the log.
 Category: Signed static PhoneLogs getInstance()
          Retrieves an instance of the phone log.
 Category: Signed  int numberOfCalls(long folderID)
          Retrieves the number of calls in a call log folder.
 Category: Signed static void removeListener(PhoneLogListener listener)
          Removes a registered PhoneLogListener instance from the system
 Category: Signed  void swapCall(CallLog call, int index, long folderID)
          Swaps the call at the given index with a new call.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOLDER_MISSED_CALLS

public static final long FOLDER_MISSED_CALLS
Folder ID for the missed call folder.
Since:
JDE 4.0.0
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.

FOLDER_NORMAL_CALLS

public static final long FOLDER_NORMAL_CALLS
Folder ID for other calls.
Since:
JDE 4.0.0
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.
Method Detail

addCall

public void addCall(CallLog call)
Adds a call to the log.

The call will appear in the message list for viewing.

Parameters:
call - Call to be added.
Since:
JDE 4.0.0
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.

addListener

public static void addListener(PhoneLogListener listener)
Registers PhoneLogListener instance with the system
Parameters:
listener - the listener to register
Throws:
NullPointerException - if the input listener to register is null.
Since:
JDE 4.0.0
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.

callAt

public CallLog callAt(int index,
                      long folderID)
Retrieves a particular call from the log by index.
Parameters:
index - The index of the call in the phone log, from 0 to (numberOfCalls(long) - 1).
folderID - ID of the folder from which to retrieve the call.
Returns:
The CallLog object at the index, if it exists; will either be a PhoneCallLog or a ConferencePhoneCallLog.
Since:
JDE 4.0.0
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.

deleteCall

public void deleteCall(int index,
                       long folderID)
Deletes a call from the log.

The call will be removed from the appropriate list.

Parameters:
index - Index of the call log to delete, from 0 to (numberOfCalls(long) - 1).
folderID - ID of the folder containing the call log to delete.
Since:
JDE 4.0.0
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.

getInstance

public static PhoneLogs getInstance()
Retrieves an instance of the phone log.

This log object contains all the calls that appear in the message list.

Returns:
Handle to the phone log.
Since:
JDE 4.0.0
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.

numberOfCalls

public int numberOfCalls(long folderID)
Retrieves the number of calls in a call log folder.
Parameters:
folderID - ID of the folder to check.
Returns:
Number of calls currently in the log.
Since:
JDE 4.0.0
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.

removeListener

public static void removeListener(PhoneLogListener listener)
Removes a registered PhoneLogListener instance from the system
Parameters:
listener - the listener instance to remove
Since:
JDE 4.0.0
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.

swapCall

public void swapCall(CallLog call,
                     int index,
                     long folderID)
Swaps the call at the given index with a new call.

The new call replaces the old call in the message list.

Parameters:
call - New call to add to the log.
index - Index of the call to be replaced, from 0 to (numberOfCalls(long) - 1).
folderID - ID of the folder containing the call to replace. You can only swap a missed call to the missed call folder and vice versa.
Since:
JDE 4.0.0
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.



Copyright 1999-2009 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.