Phone

The Phone Identity object contains information regarding the user's phone lines on a BlackBerry smartphone.

Supported Platform(s)

- BlackBerry OS 5.0+
- Ripple Emulator

View Supported Platform Table

APIOS 5.0OS 6.0OS 7.0PlayBookRipple
getLineIds Y Y Y  Y
getLineLabel Y Y Y  Y
getLineNumber Y Y Y  Y
getLineType 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 IDOS 5.0OS 6.0OS 7.0PlayBookRipple
<feature id="blackberry.identity.phone" /> 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.

getLineIds


static Number[] getLineIds()

Supported Platform(s)

 - BlackBerry OS 5.0+
 - Ripple Emulator

Description

Returns the id of all the lines registered with the device.


getLineLabel


static String getLineLabel(lineId : Number)

Supported Platform(s)

 - BlackBerry OS 5.0+
 - Ripple Emulator

Description

Returns a string description of the line specified.



Parameter Type Description
lineId Number [optional] ID of the line to retrieve the label for. If not specified the label for the default line is returned.

getLineNumber


static Number getLineNumber(lineId : Number)

Supported Platform(s)

 - BlackBerry OS 5.0+
 - Ripple Emulator

Description

Returns the phone number of the line specified.



Parameter Type Description
lineId Number [optional] ID of the line to retrieve the label for. If not specified the label for the default line is returned.

getLineType


static Number getLineType(lineId : Number)

Supported Platform(s)

 - BlackBerry OS 5.0+
 - Ripple Emulator

Description

Returns the type of the line specified.



Parameter Type Description
lineId Number [optional] ID of the line to retrieve the label for. If not specified the label for the default line is returned.

Code Example(s)


<script type="text/javascript">
  var lines = blackberry.identity.phone.getLineIds();
  for (var i = 0; i < lines.length-1; i++) {
    alert("Line id : " + lines[i] + " has phone number : " + blackberry.identity.phone.getLineNumber(lines[i]));
  }
</script>

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