Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
Posts: 15
Registered: ‎11-23-2013
My Device: BB Z10
My Carrier: Idea
Accepted Solution

Device PIN or UUID Comming Null

Hi,

 

I am trying to get my device id by using blackberry.invoke.uuid for my z10 device i get null.

On the same hand i use this in emulator it gives me some PIN.

I am using webworks 1.0.

 

Not able to find a solution for this . Need Help .

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Device PIN or UUID Comming Null

There are two things you will need to correct:

 

1. The following API should be used to retrieve the UUID (you are using invoke, it should be identity):

 

var id = blackberry.identity.UUID;

 

2. If using the WebWorks 2.0 beta, make sure to add the API to your project using the following:

 

webworks plugin add com.blackberry.identity

 

More: https://developer.blackberry.com/html5/apis/beta/blackberry.identity.html

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
Posts: 49
Registered: ‎05-02-2013
My Device: Z 10
My Carrier: airtel

Re: Device PIN or UUID Comming Null

Please verify that you have add the following permission element. 

<feature id="blackberry.identity" />
<feature id="blackberry.identity.phone" />
<rim:permissions>
<rim:permit>read_device_identifying_information</rim:permit>
</rim:permissions>
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Device PIN or UUID Comming Null

Note: if you are using the BlackBerry 10 WebWorks 2.0 SDK Beta, when you add a plugin to your project, the SDK will automatically create the permissions element in the generated config.xml file.

 

If you are using BlackBerry 10 WebWorks 1.0, then as mvishnumkl suggests, you will have to add this manually in order to read protected information like device UUID.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.