|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.blackberry.api.phone.phonelogs.PhoneLogs
public final class PhoneLogs
A container to maintain a list of CallLog objects that together
represent the call log for phone calls stored in the message list.
Call logs are stored in two folders: One for missed calls, and one for all other calls.
Once you have retrieved an instance of the PhoneLogs object using the
PhoneLogs.getInstance() method, you can use the object to add, delete, or change
CallLog objects from the log.
| Field Summary | ||
|---|---|---|
|
static long |
FOLDER_MISSED_CALLS
Folder ID for the missed call folder. |
|
static long |
FOLDER_NORMAL_CALLS
Folder ID for other calls. |
| Method Summary | ||
|---|---|---|
|
void |
addCall(CallLog call)
Adds a call to the log. |
|
static void |
addListener(PhoneLogListener listener)
Registers a PhoneLogListener instance with the system. |
|
CallLog |
callAt(int index,
long folderID)
Retrieves a particular call from the log by index. |
|
void |
deleteCall(int index,
long folderID)
Deletes a call from the log. |
|
static PhoneLogs |
getInstance()
Retrieves an instance of the call log. |
|
int |
numberOfCalls(long folderID)
Retrieves the number of calls in a given call log folder. |
|
static void |
removeListener(PhoneLogListener listener)
Removes a registered PhoneLogListener instance from the system. |
|
void |
swapCall(CallLog call,
int index,
long folderID)
Replaces 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 |
|---|
public static final long FOLDER_MISSED_CALLS
public static final long FOLDER_NORMAL_CALLS
| Method Detail |
|---|
public static PhoneLogs getInstance()
This object contains all the calls that appear in the message list.
public void addCall(CallLog call)
The call appears in the message list for viewing.
call - Call to be added.
public void swapCall(CallLog call,
int index,
long folderID)
The new call replaces the old call in the message list.
call - New call to add to the log.index - Index of the call to be replaced, from
0 to (PhoneLogs.numberOfCalls(long) - 1).folderID - ID of the folder containing the call to replace (PhoneLogs.FOLDER_MISSED_CALLS or PhoneLogs.FOLDER_NORMAL_CALLS). You can
only replace a missed call to the missed call folder and vice versa.
public void deleteCall(int index,
long folderID)
The call will be removed from the appropriate list.
index - Index of the call log to delete, from
0 to (PhoneLogs.numberOfCalls(long) - 1).folderID - ID of the folder containing the call log to delete (PhoneLogs.FOLDER_MISSED_CALLS or PhoneLogs.FOLDER_NORMAL_CALLS).public int numberOfCalls(long folderID)
folderID - ID of the folder to check (PhoneLogs.FOLDER_MISSED_CALLS or PhoneLogs.FOLDER_NORMAL_CALLS).
public CallLog callAt(int index,
long folderID)
index - The index of the call in the phone log, from
0 to (PhoneLogs.numberOfCalls(long) - 1).folderID - ID of the folder from which to retrieve the call (PhoneLogs.FOLDER_MISSED_CALLS or PhoneLogs.FOLDER_NORMAL_CALLS).
CallLog object at the index, if it exists. Either
PhoneCallLog or ConferencePhoneCallLog.public static void addListener(PhoneLogListener listener)
PhoneLogListener instance with the system.
listener - The listener to register.
NullPointerException - if the input listener
to register is null.public static void removeListener(PhoneLogListener listener)
PhoneLogListener instance from the system.
listener - The listener instance to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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.