CallLog

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


Code Example:
<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>


Supported Platform(s)

- BlackBerry OS 5.0+
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
addressBookNumber Y Y Y      Y
addressBookType Y Y Y      Y
date Y Y Y      Y
duration Y Y Y      Y
name Y Y Y      Y
notes Y Y Y      Y
number Y Y Y      Y
status Y Y Y      Y
type Y Y Y      Y
STATUS_NORMAL Y Y Y      Y
STATUS_BUSY Y Y Y      Y
STATUS_CONGESTION Y Y Y      Y
STATUS_PATH_UNAVAILABLE Y Y Y      Y
STATUS_NUMBER_UNOBTAINABLE Y Y Y      Y
STATUS_AUTHENTICATION_FAILURE Y Y Y      Y
STATUS_EMERGENCY_CALLS_ONLY Y Y Y      Y
STATUS_HOLD_ERROR Y Y Y      Y
STATUS_OUTGOING_CALLS_BARRED Y Y Y      Y
STATUS_GENERAL_ERROR Y Y Y      Y
STATUS_MAINTENANCE_REQUIRED Y Y Y      Y
STATUS_SERVICE_NOT_AVAILABLE Y Y Y      Y
STATUS_CALL_FAIL_DUE_TO_FADING Y Y Y      Y
STATUS_CALL_LOST_DUE_TO_FADING Y Y Y      Y
STATUS_CALL_FAILED_TRY_AGAIN Y Y Y      Y
STATUS_FDN_MISMATCH Y Y Y      Y
STATUS_CONNECTION_DENIED Y Y Y      Y
STATUS_INCOMING_CALL_BARRED Y Y Y      Y
TYPE_RECEIVED_CALL Y Y Y      Y
TYPE_PLACED_CALL Y Y Y      Y
TYPE_MISSED_CALL_UNOPENED Y Y Y      Y
TYPE_MISSED_CALL_OPENED Y Y Y      Y

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 IDBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
<feature id="blackberry.phone.PhoneLogs" /> Y Y Y      Y

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

Properties

String addressBookNumber
String addressBookType
Date date
Number duration
String name
String notes
String number
Number status
Number type

Properties

readonly String addressBookNumber


The address book phone number for this call. If not found, the raw phone number is returned.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly String addressBookType


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.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly Date date


The call log's date.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly Number duration


The call log's duration in seconds.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly String name


Name associated with this call.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly String notes


The call log's notes.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly String number


The original phone number for this call.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly Number status


The call log's one of the STATUS_* values indicating the status of this logged call.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly Number type


Type for this call; one of the TYPE_* values.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Constants

static Number STATUS_NORMAL = 0


Normal call status (no errors).


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_BUSY = 1


Busy call status.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_CONGESTION = 2


Error due to congestion.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_PATH_UNAVAILABLE = 3


Error due to path unavailability.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_NUMBER_UNOBTAINABLE = 4


Error due to number unobtainability.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_AUTHENTICATION_FAILURE = 5


Error due to call authorization failure.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_EMERGENCY_CALLS_ONLY = 6


Emergency calls only.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_HOLD_ERROR = 7


Call hold error.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_OUTGOING_CALLS_BARRED = 8


Outgoing calls barred.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_GENERAL_ERROR = 9


General error.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_MAINTENANCE_REQUIRED = 10


Maintenance required.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_SERVICE_NOT_AVAILABLE = 11


Service not available.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_CALL_FAIL_DUE_TO_FADING = 12


Call failed due to fading.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_CALL_LOST_DUE_TO_FADING = 13


Call lost due to fading.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_CALL_FAILED_TRY_AGAIN = 14


Call failed, try again.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_FDN_MISMATCH = 15


An FDN mismatch occured.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_CONNECTION_DENIED = 16


Call connection was denied.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number STATUS_INCOMING_CALL_BARRED = 27


Incoming call barred


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number TYPE_RECEIVED_CALL = 0


Incoming call that was successfully received.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number TYPE_PLACED_CALL = 1


Successfully connected outgoing call.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number TYPE_MISSED_CALL_UNOPENED = 2


Call that was missed and has not been viewed yet.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number TYPE_MISSED_CALL_OPENED = 3


Call that was missed and that has been viewed.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

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