CallLog

The CallLog object represents an entry in the call log of the phone application.

Supported Platform(s)

- BlackBerry OS 5.0+
- Ripple Emulator

View Supported Platform Table


Configuration Document Settings

To use all of the API described for this object, you must ensure the following settings are in your configuration document:


You must declare the feature element(s) below in your configuration document:

Feature IDOS 5.0OS 6.0OS 7.0PlayBookRipple
<feature id="blackberry.phone.PhoneLogs" /> Y Y Y  Y

Permission Elements (PlayBook Only)
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application.

Properties:


Property Type Description Supported Platform(s)
addressBookNumber String
readonly
The address book phone number for this call. If not found, the raw phone number is returned.
 - BlackBerry OS 5.0+
 - Ripple Emulator
addressBookType String
readonly
Type of the caller ID as stored in the contact list.

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 (for example, home or work) is returned. If not, a default type is returned (for example, "Phone"). Otherwise, an empty string is returned.
 - BlackBerry OS 5.0+
 - Ripple Emulator
date Date
readonly
The call log's date.
 - BlackBerry OS 5.0+
 - Ripple Emulator
duration Number
readonly
The call log's duration in seconds.
 - BlackBerry OS 5.0+
 - Ripple Emulator
name String
readonly
Name associated with this call.
 - BlackBerry OS 5.0+
 - Ripple Emulator
notes String
readonly
The call log's notes.
 - BlackBerry OS 5.0+
 - Ripple Emulator
number String
readonly
The original phone number for this call.
 - BlackBerry OS 5.0+
 - Ripple Emulator
status Number
readonly
The call log's one of the STATUS_* values indicating the status of this logged call.
 - BlackBerry OS 5.0+
 - Ripple Emulator
type Number
readonly
Type for this call; one of the TYPE_* values.
 - BlackBerry OS 5.0+
 - Ripple Emulator

Constants:


Property Type Description Supported Platform(s)
STATUS_NORMAL default: 0 Number Normal call status (no errors).
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_BUSY default: 1 Number Busy call status.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_CONGESTION default: 2 Number Error due to congestion.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_PATH_UNAVAILABLE default: 3 Number Error due to path unavailability.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_NUMBER_UNOBTAINABLE default: 4 Number Error due to number unobtainability.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_AUTHENTICATION_FAILURE default: 5 Number Error due to call authorization failure.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_EMERGENCY_CALLS_ONLY default: 6 Number Emergency calls only.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_HOLD_ERROR default: 7 Number Call hold error.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_OUTGOING_CALLS_BARRED default: 8 Number Outgoing calls barred.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_GENERAL_ERROR default: 9 Number General error.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_MAINTENANCE_REQUIRED default: 10 Number Maintenance required.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_SERVICE_NOT_AVAILABLE default: 11 Number Service not available.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_CALL_FAIL_DUE_TO_FADING default: 12 Number Call failed due to fading.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_CALL_LOST_DUE_TO_FADING default: 13 Number Call lost due to fading.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_CALL_FAILED_TRY_AGAIN default: 14 Number Call failed, try again.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_FDN_MISMATCH default: 15 Number An FDN mismatch occured.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_CONNECTION_DENIED default: 16 Number Call connection was denied.
 - BlackBerry OS 5.0+
 - Ripple Emulator
STATUS_INCOMING_CALL_BARRED default: 27 Number Incoming call barred
 - BlackBerry OS 5.0+
 - Ripple Emulator
TYPE_RECEIVED_CALL default: 0 Number Incoming call that was successfully received.
 - BlackBerry OS 5.0+
 - Ripple Emulator
TYPE_PLACED_CALL default: 1 Number Successfully connected outgoing call.
 - BlackBerry OS 5.0+
 - Ripple Emulator
TYPE_MISSED_CALL_UNOPENED default: 2 Number Call that was missed and has not been viewed yet.
 - BlackBerry OS 5.0+
 - Ripple Emulator
TYPE_MISSED_CALL_OPENED default: 3 Number Call that was missed and that has been viewed.
 - BlackBerry OS 5.0+
 - Ripple Emulator

Code Example(s)


<script type="text/javascript">
  // Display the details of 'missed' call log retreived at index specified
  var index = 1;
  var res = blackberry.phone.PhoneLogs.callAt(index, blackberry.phone.PhoneLogs.FOLDER_MISSED_CALLS);
  displayLogDetails(res);

  function displayLogDetails(callLog) {
    alert(("Date: " + callLog.date + "\n") +
    ("Duration: " + callLog.duration + "\n") +
    ("Notes: " + callLog.notes + "\n") +
    ("Status: " + callLog.status + "\n") +
    ("Type: " + callLog.type + "\n") +
    ("Name: " + callLog.name + "\n") +
    ("Number: " + callLog.number + "\n") +
    ("AddressBookNumber: " + callLog.addressBookNumber + "\n") +
    ("AddressBookType: " + callLog.addressBookType));
  }    
</script>

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 13:31:15 GMT-0500 (EST)