Service

The Service object represents a service entry that describes specifics for a service on a BlackBerry smartphone.


Code Example:
<script type="text/javascript">
  // Enumerate all of our services on the device.
  var services = blackberry.identity.getServiceList();
  for (var i = 0; i < services.length; i++) {
    if (services[i].type == blackberry.identity.Service.TYPE_CONTACT) {
      alert("Name: " + services[i].name);
    }
  }
</script>


Supported Platform(s)

- BlackBerry OS 5.0+
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
emailAddress Y Y Y      Y
name Y Y Y      Y
type Y Y Y      Y
TYPE_EMAIL Y Y Y      Y
TYPE_CALENDAR Y Y Y      Y
TYPE_CONTACT 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" /> 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 emailAddress
String name
Number type

Constants

Number TYPE_EMAIL
Number TYPE_CALENDAR
Number TYPE_CONTACT

Properties

readonly String emailAddress


Email address associated with the service.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly String name


Name of the service


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly Number type


Specifies the type of service. This can be one of Calendar, Email or Contacts.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Constants

static Number TYPE_EMAIL


Constant denoting a type of EMAIL


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number TYPE_CALENDAR


Constant denoting a type of CALENDAR


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number TYPE_CONTACT


Constant denoting a type of CONTACT


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

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