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
Developer
Posts: 33
Registered: ‎03-04-2011
My Device: PlayBook
Accepted Solution

Accessing PlayBook PIN / UDID

[ Edited ]

Hello,

 

Is it possible to access unique information about the PlayBook, such as its PIN, through the WebWorks SDK?

 

Thanks.

Developer
Posts: 33
Registered: ‎03-04-2011
My Device: PlayBook

Re: Accessing PlayBook PIN / UDID

This doesn't seem to be available in the latest WebWorks Tablet SDK, but is in the AIR and Widget SDKs.

Is there some way to hack it in?
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Accessing PlayBook PIN / UDID

The retrieval of the PIN is tentatively planned for the next release of the WebWorks SDK for Tablet OS.  It will be added to the blackberry.identity object like it is on the BlackBerry Smartphone.

 

If you feel up to the task you can expose it today by trying to create an extension into ActionScript, but it isn't for the faint of heart and we don't have documentation posted on how to make it happen. 

 

You would have to take a look at the source code that is part of the SDK in your install folder and mimic one of the other APIs

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 33
Registered: ‎03-04-2011
My Device: PlayBook

Re: Accessing PlayBook PIN / UDID

Thanks for the information. I'll give it a go and see what I can come up with
New Contributor
Posts: 3
Registered: ‎07-25-2011
My Device: Playbook
My Carrier: none

Re: Accessing PlayBook PIN / UDID

And how is it done in AIR? I can't find it anywhere Smiley Sad
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Accessing PlayBook PIN / UDID

This functionality was released with the WebWorks SDK for Tablet OS v2.1

 

API details here:

http://www.blackberry.com/developers/docs/webworks/api/blackberry.identity.html

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 8
Registered: ‎07-12-2011
My Device: Playbook
My Carrier: N?A

Re: Accessing PlayBook PIN / UDID

Tim, that doesn't seem to actually work. blackberry.identity.PIN always returns null in WebWorks apps on the PlayBook devices I've tested (yes, the permission is set in config.xml). The AJAX call also returns {"data":{"PIN":null},"code":0,"msg":null}.

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Accessing PlayBook PIN / UDID

Is this on the simulator or the actual PlayBook device?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Highlighted
New Contributor
Posts: 8
Registered: ‎07-12-2011
My Device: Playbook
My Carrier: N?A

Re: Accessing PlayBook PIN / UDID

On the actual device. I've tried it on three of our development devices so far. We're using SDK version 2.1.0.6 and our devices are running 1.0.7.2670 or 1.0.7.2942.
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Accessing PlayBook PIN / UDID

And you have included both of the following in your config.xml..

 

<rim:permit>read_device_identifying_information</rim:permit>
<feature id="blackberry.identity" />

 

Is your JavaScript running locally or is it in a page you are bringing in from a remote URL?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter