The Identity object contains information regarding the user's identity and accounts on a BlackBerry smartphone.

Supported Platform(s)
- BlackBerry OS 5.0+
- BlackBerry PlayBook
- Supported Platform Table: Expand

Configuration Document Settings
To use all of the API described for this object, you must ensure the following settings are in your configuration document:
Feature Elements
You must declare the feature element(s) below in your configuration document:
Feature ID OS 5.0 OS 6.0 OS 7.0 PlayBook
<feature id="blackberry.identity" /> Y Y Y Y
<feature id="blackberry.identity.phone" /> Y Y Y Y

Permission Elements (PlayBook Only)
You must declare the permission element(s) below in your configuration document:
- <rim:permit>read_device_identifying_information</rim:permit> Permits your app to access device identifiers.

Functions


Properties


URI Functions

blackberry.identity.getServiceList


static Service[] getServiceList()

Supported Platform(s)
 - BlackBerry OS 5.0+

Description
 Returns the list of Service objects that describe each of the services that the user has for their device.

Returns

blackberry.identity.getTransportList


static Transport[] getTransportList()

Supported Platform(s)
 - BlackBerry OS 5.0+

Description
 Returns a list of possible communications transports that can be used.

Returns

Code Example(s)
<script type="text/javascript">
  var transportList = blackberry.identity.getTransportList();
  for (var i = 0; i < transportList.length; i++) {
    alert("Transport name is:" + transportList[i].name + "\ntransport type:" + transportList[i].type);
  }
</script>

Properties:


Property Type Description Supported Platform(s)
blackberry.identity.IMEI Static
String
readonly
Contains the IMEI number for the smartphone.
 - BlackBerry OS 5.0+
blackberry.identity.IMSI Static
String
readonly
Contains the IMSI number for the smartphone.
 - BlackBerry OS 5.0+
blackberry.identity.PIN Static
String
readonly
Contains the Personal Identification number for the smartphone.
 - BlackBerry OS 5.0+
 - BlackBerry PlayBook

webworks://blackberry/identity/get


Description
 Returns a JSON object containing the PIN of the device.

Supported Platform(s)
 - BlackBerry PlayBook

Returns
{
	"data":{
		"PIN":"0x12345678",
	}
}

Code Example(s)
<html>
<head>
    <script type="text/javascript" src="js/jquery-1.4.2.js" ></script>
    <script type="text/javascript" src="js/jquery.form.js" ></script>
    <script type="text/javascript" src="js/jquery.populate.js" ></script>
    
    <script type="text/javascript">  
	function getIdentityData(){
		$.ajax({
		    type: "get",
		    url: "webworks://blackberry/identity/get",
		    success: function(msg){
		      $('#myIdentityDiv').populate(JSON.parse(msg).data);
		    }
		});
	}
     </script>
     
</head>
<body>

   <input type="button" onclick="getIdentityData();" value="Populate - IDENTITY"/>
   <div id="myIdentityDiv">
       PIN: <span id="PIN"></span><br/>
   </div>
   
</body>
</html>

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Sep 14 2011 09:55:31 GMT-0000 (UTC)