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

Native Development

Reply
Developer
Posts: 692
Registered: ‎08-09-2010
My Device: Not Specified

How to fetch BlackBerry Device PIN Programmatically into Cascades?

Hello,

 

    Please provide me any way for fetch BlackBerry Device  PIN Programmatically  into Cascades.

 

Thanks.

Retired
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: How to fetch BlackBerry Device PIN Programmatically into Cascades?

Hi there,

 

This is currently not available from a development standpoint;

 

Martin

Developer
Posts: 692
Registered: ‎08-09-2010
My Device: Not Specified

Re: How to fetch BlackBerry Device PIN Programmatically into Cascades?

K.So may i know when you provide this thing because i need some urgent.

 

Thanks.

Retired
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: How to fetch BlackBerry Device PIN Programmatically into Cascades?

Unfortunately I do not have a date for this feature;

 

Martin

Developer
Posts: 692
Registered: ‎08-09-2010
My Device: Not Specified

Re: How to fetch BlackBerry Device PIN Programmatically into Cascades?

K.But tomorrow blackberry VP Mr.Alce Saunders told me that you got all functionality asap thus i told you Smiley Happy.

 

Thanks.

Highlighted
Developer
Posts: 292
Registered: ‎07-25-2008
My Device: Passport

Re: How to fetch BlackBerry Device PIN Programmatically into Cascades?

It may not be available in the Qt-friendly Cascades API, but it most definitely is available via the BPS API.  (And yes, you can use BPS on the Dev Alpha as well.)  Here's some sample code showing how to get the PIN as the familar hex string:

 

 

 


#include <bps/deviceinfo.h>

 

QString getDevicePIN()

{

    QString pin;
    deviceinfo_identifying_details_t *deviceDetails;
    if(deviceinfo_get_identifying_details(&deviceDetails) == BPS_SUCCESS) {
        int pinValue = deviceinfo_identifying_details_get_pin(deviceDetails);
        pin = QString::number(pinValue, 16);
        deviceinfo_free_identifying_details(&deviceDetails);
    }
    return pin;

}