Phone

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


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


Supported Platform(s)

- BlackBerry OS 5.0+
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
blackberry.identity.phone.getLineIds Y Y Y      Y
blackberry.identity.phone.getLineLabel Y Y Y      Y
blackberry.identity.phone.getLineNumber Y Y Y      Y
blackberry.identity.phone.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 IDBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
<feature id="blackberry.identity.phone" /> 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.

Functions

static Number[] blackberry.identity.phone.getLineIds ()


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


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static String blackberry.identity.phone.getLineLabel (lineId : Number)


Returns a string description of the line specified.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator


Parameters
lineId [optional] ID of the line to retrieve the label for. If not specified the label for the default line is returned.

static Number blackberry.identity.phone.getLineNumber (lineId : Number)


Returns the phone number of the line specified.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator


Parameters
lineId [optional] ID of the line to retrieve the label for. If not specified the label for the default line is returned.

static Number blackberry.identity.phone.getLineType (lineId : Number)


Returns the type of the line specified.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator


Parameters
lineId [optional] ID of the line to retrieve the label for. If not specified the label for the default line is returned.
Documentation generated by JsDoc Toolkit 2.4.0 on Mon Feb 11 2013 14:51:08 GMT-0500 (EST)