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>
|
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 | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
<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
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)