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
Highlighted
Contributor
Posts: 23
Registered: ‎10-08-2012
My Device: 9800
My Carrier: vodafone

Pin code in Blackberry10 And in Blackberry 7

Hi, I have a service that stores PIN vlaues to db, I get and svae the value from java as int as following

int pin= DeviceInfo.getDeviceId();

 if the PIn hex decimal value is FFFFA594, I get theint vlaue =-23148 -----------------------------------------------------(1)

 

And I get the value from C++ cascades as following

deviceinfo_identifying_details_t *deviceDetails;
if (deviceinfo_get_identifying_details(&deviceDetails) == BPS_SUCCESS) {
		int pinValue = deviceinfo_identifying_details_get_pin(deviceDetails);
}

 and if the PIn hex decimal value is FFFFA594, I get theint vlaue = -1201679335 -------------------------------------(2)

 

 

From (1) and (2), I found a huge differance although the Hex decimal value is the same

Now How can I convert  -1201679335 to -23148 ??

 

 

Please Help

Thanks

 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Pin code in Blackberry10 And in Blackberry 7

You can't. The values are not related. I think you're printing the wrong thing when you get the -1201679335 value in your C++.

Since you don't show the code for that, I can't say what you're doing wrong, but FFFFA594 is certainly -23148 (as a 32-bit signed int) so it's your C++ code that's broken.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!