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™ Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 2
Registered: ‎02-29-2012
My Device: Blackberry Playbook
My Carrier: Airtel
Accepted Solution

Unique Device ID for Blackberry Playbook

    My android app, which I am trying to port on playbook, requirs an unique device id to identify each installation. On android I use device's IMEI as uniqe id. I can get this using following code

 

TelephonyManager mTelephonyMgr = (TelephonyManager) app_context.getSystemService(Context.TELEPHONY_SERVICE);

String imei = mTelephonyMgr.getDeviceId();

 Same code on playbook simulator returned me 0000000000429496681245 as IMEI of device. Now I am not sure what this number is and will it be unique?

 

AFAIK blackberry devices has a PIN as unique id.

 

Is there a way to access PIN of device using androud code?

 

Please help....

 

Thanks in advance...

Developer
Posts: 55
Registered: ‎01-25-2012
My Device: BlackBerry Torch 9800 & PlayBook

Re: Unique Device ID for Blackberry Playbook

[ Edited ]

Nope, there is no way to get the PIN ... RIM really needs to do something about this ...


EDIT : I'm working on a way to get it ... Just waiting to receive my PB to test it ...

Developer
Posts: 55
Registered: ‎01-25-2012
My Device: BlackBerry Torch 9800 & PlayBook

Re: Unique Device ID for Blackberry Playbook

[ Edited ]

Well turns out it contains the PIN in decimal format.

 

		TelephonyManager tm = (TelephonyManager)getContext().getSystemService(Context.TELEPHONY_SERVICE);
		
		String strDevice = tm.getDeviceId();
		
		String strPIN = strDevice.substring(10, strDevice .length() - 2);

 

Highlighted
New Contributor
Posts: 2
Registered: ‎02-29-2012
My Device: Blackberry Playbook
My Carrier: Airtel

Re: Unique Device ID for Blackberry Playbook

[ Edited ]

Yes. You are right.

 

We can also get exact PIN Smiley Happy

 

                TelephonyManager tm = (TelephonyManager)getContext().getSystemService(Context.TELEPHONY_SERVICE);
		
		String strDevice = tm.getDeviceId();
		
		String strPIN = strDevice.substring(10, strDevice .length() - 2);

                strPIN = Long.toHexString(Long.parseLong(strPIN ));

 Thanks

New Contributor
Posts: 7
Registered: ‎03-17-2012
My Device: Playbook Soon!
My Carrier: ATT

Re: Unique Device ID for Blackberry Playbook

Is there any way to get the 16 digit device ID?
New Contributor
Posts: 7
Registered: ‎03-17-2012
My Device: Playbook Soon!
My Carrier: ATT

Re: Unique Device ID for Blackberry Playbook

Solved!

String deviceId = Settings.System.getString(getContentResolver(), Settings.System.ANDROID_ID);
Visitor
Posts: 1
Registered: ‎07-28-2012
My Device: playbook
My Carrier: Tbaytel

Re: Unique Device ID for Blackberry Playbook

Where do I type this to get the ID?