|
|||||||||
| 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 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
PhoneLogs.getInstance() method, you can use the object to add, delete, or swap
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 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 phone log. |
|
int |
numberOfCalls(long folderID)
Retrieves the number of calls in a call log folder. |
|
static void |
removeListener(PhoneLogListener listener)
Removes a registered PhoneLogListener instance from the system |
|
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 |
|---|
public static final long FOLDER_MISSED_CALLS
public static final long FOLDER_NORMAL_CALLS
| Method Detail |
|---|
public static PhoneLogs getInstance()
This log object contains all the calls that appear in the message list.
public void addCall(CallLog call)
The call will appear 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. You can
only swap 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.public int numberOfCalls(long folderID)
folderID - ID of the folder to check.
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.
CallLog object at the index, if it exists; will
either be a PhoneCallLog or a ConferencePhoneCallLog.public static void addListener(PhoneLogListener listener)
listener - the listener to register
NullPointerException - if the input listener
to register is null.public static void removeListener(PhoneLogListener listener)
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.