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
ignites
Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900
My Carrier: Rogers

Get Pin for BBOS Devices

Is it possible to grab the pin of BBOS devices? I see this function in the APIs for PB devices but not BBOS devices.

 

thanks!


Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
Please use plain text.
BlackBerry Development Advisor
anzor_b
Posts: 164
Registered: ‎09-24-2012
My Device: White BlackBerry 10
My Carrier: Bell

Re: Get Pin for BBOS Devices

Hi ignites,

 

The APIs described here: https://developer.blackberry.com/html5/apis/blackberry.identity.html work for BBOS devices 5.0+ as well as PlayBook and BB10.

 

Let me know if you are having any trouble with those.

Please use plain text.
Developer
ignites
Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900
My Carrier: Rogers

Re: Get Pin for BBOS Devices

Maybe I am reading it incorrectly but the URI function here https://developer.blackberry.com/html5/apis/blackberry.identity.html#.get saids for PlayBook 1.0+ only.

I am not too familiar with this 'static readonly String PIN ' statement. Theres no function or sample.

Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
Please use plain text.
BlackBerry Development Advisor
anzor_b
Posts: 164
Registered: ‎09-24-2012
My Device: White BlackBerry 10
My Carrier: Bell

Re: Get Pin for BBOS Devices

Hi ignites,

 

As long as you have the webworks.js file included in index.html, you have the blackberry object available in the global scope.

 

This means doing a console.log(blackberry.identity.PIN) will return the PIN.

 

Let me know if this works for you.

Please use plain text.
BlackBerry Development Advisor
kwallis
Posts: 137
Registered: ‎01-19-2010
My Device: BlackBerry Z10
My Carrier: AT&T

Re: Get Pin for BBOS Devices

For BBOS, you do not need to include a webworks.js file. 

 

You just need to ensure that blackberry.identity is listed as a feature available to the domain this html file is coming from.

Ken Wallis - Senior Product Manager, WebWorks and Android Runtime
@ken_wallis
Please use plain text.
BlackBerry Development Advisor
anzor_b
Posts: 164
Registered: ‎09-24-2012
My Device: White BlackBerry 10
My Carrier: Bell

Re: Get Pin for BBOS Devices

Good call Ken. Missed that one :smileyhappy:

Please use plain text.