Identity

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 1.0+
- BlackBerry 10
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
blackberry.identity.getServiceList Y Y Y      Y
blackberry.identity.getTransportList Y Y Y      Y
http://localhost:8472/blackberry/identity/get       Y Y   
IMEI Y Y Y     YY
IMSI Y Y Y      Y
PIN Y Y Y Y Y  Y
uuid           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 Y YY
<feature id="blackberry.identity.phone" /> Y Y Y Y Y YY
Permission Elements (PlayBook and BlackBerry 10+)
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.


Properties

String IMEI
String IMSI
String PIN
String uuid

URI Functions

Functions

static Service[] blackberry.identity.getServiceList ()


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


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Transport[] blackberry.identity.getTransportList ()


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


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator


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

static readonly String IMEI


Contains the IMEI number for the smartphone.


Supported Platforms
 - BlackBerry OS 5.0+
 - BlackBerry 10
 - Ripple Emulator

static readonly String IMSI


Contains the IMSI number for the smartphone.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static readonly String PIN

BB10 API Changes

PIN has been changed to uuid in BlackBerry 10.


Contains the Personal Identification number for the device.


Supported Platforms
 - BlackBerry OS 5.0+
 - BlackBerry PlayBook 1.0+
 - Ripple Emulator

static readonly String uuid


Contains the unique identifier for the device.


Supported Platforms
 - BlackBerry 10

URI Functions

http://localhost:8472/blackberry/identity/get


Returns a JSON object containing the PIN of the device.


Supported Platforms
 - BlackBerry PlayBook 1.0+


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


Code Example:
<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: "http://localhost:8472/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 Mon Feb 11 2013 14:51:07 GMT-0500 (EST)