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

Android™ Runtime Development

Reply
New Contributor
bbforever123
Posts: 3
Registered: ‎05-10-2013
My Device: Curve

How to get PIN from Q10

I use the following code to obtain a PIN from Z10. 

 

TelephonyManager tm = (TelephonyManager)getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);

return tm.getDeviceId();

 

However, this code returns a IMEI for a Q10. This is reported by a user and I don't have Q10 to debug. It is frustrated that Blackberry change the return value for a well known api. 

 

Anybody knows how to get the PIN from a Q10?

 

 

Contributor
Dritanxha
Posts: 22
Registered: ‎02-26-2013
My Device: Z10

Re: How to get PIN from Q10

For me, that returns null so I'm also surprised that you're actually getting something.

 

The biggest difference is that the same line of code returns the BB10 device serial on the Z10 while on the Q10 it's just plain old null. (See http://supportforums.blackberry.com/t5/Android-Runtime-Development/How-to-get-PIN-UUID-of-BB10-Z10-f...)

 

Any help from BB officials would be greatly appreciated!

BlackBerry Development Advisor
bbenninger
Posts: 130
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: How to get PIN from Q10

getDeviceId is *supposed* to return the IMEI.

 

There is currently no API exposed to retreive BBID / PIN.

New Contributor
bbforever123
Posts: 3
Registered: ‎05-10-2013
My Device: Curve

Re: How to get PIN from Q10

Is this the offical answer from Blackberry?

 

My app has a dynamic licensing model. When user buys the app, App World send the device pin to my server, which records the pin to the backend database. When the user open the app, my code check the pin against the pin database to validate for the license. Now the code to obtain pin from the device does not work and the app cannot function. I have a lot of angry customers. 

 

Please provide a solution. Otherwise, I need to pull my app from App World.

BlackBerry Development Advisor
bbenninger
Posts: 130
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: How to get PIN from Q10

[ Edited ]

I'm confused.  There's never been an Android API to retreive the PIN.

 

Edit:  See my response here in the following link for the details about getDeviceId.

 

http://supportforums.blackberry.com/t5/Android-Runtime-Development/Q10-TELEPHONY-SERVICE-getDeviceId...

New Contributor
bbforever123
Posts: 3
Registered: ‎05-10-2013
My Device: Curve

Re: How to get PIN from Q10

I found this post. Maybe this is the solution.

 

Quote

 

The device PIN is returned as a token in the GCM intent listener when registration has been completed. It can be retrieved from the intent using the following code:
final String token = intent.getStringExtra("registration_id");

 

Unquote

 

Source:

http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/How-to-get-the-Push-Pin-on-Androi...

BlackBerry Development Advisor
bbenninger
Posts: 130
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: How to get PIN from Q10

That's just for Push though.  Not a generic PIN retreival API.

New Member
BBloveragain
Posts: 1
Registered: ‎02-28-2014
My Device: Q10

Re: How to get PIN from Q10

Are you asking about the device PIN? or somthing different?