Service
The Service object represents a service entry that describes specifics for a service on a BlackBerry smartphone.
Supported Platform(s)
- BlackBerry OS 5.0+
- Ripple Emulator
API | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
---|---|---|---|---|---|
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 ID | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
---|---|---|---|---|---|
<feature id="blackberry.identity" /> | 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) |
---|---|---|---|
emailAddress |
String
readonly |
Email address associated with the service.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
name |
String
readonly |
Name of the service
|
- BlackBerry OS 5.0+
- Ripple Emulator |
type |
Number
readonly |
Specifies the type of service. This can be one of Calendar, Email or Contacts.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
Constants:
Property | Type | Description | Supported Platform(s) |
---|---|---|---|
TYPE_EMAIL | Number |
Constant denoting a type of EMAIL
|
- BlackBerry OS 5.0+
- Ripple Emulator |
TYPE_CALENDAR | Number |
Constant denoting a type of CALENDAR
|
- BlackBerry OS 5.0+
- Ripple Emulator |
TYPE_CONTACT | Number |
Constant denoting a type of CONTACT
|
- BlackBerry OS 5.0+
- Ripple Emulator |
Code Example(s)
<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 == services[i].TYPE_CONTACT) { alert("Name: " + services[i].name); } } </script>
Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 13:31:20 GMT-0500 (EST)