02-29-2012 02:31 AM
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...
Solved! Go to Solution.
02-29-2012 10:20 PM - edited 02-29-2012 10:21 PM
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 ...
03-01-2012 05:14 AM - edited 03-01-2012 05:14 AM
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);
03-01-2012 08:40 AM - edited 03-01-2012 08:49 AM
Yes. You are right.
We can also get exact PIN ![]()
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
03-24-2012 07:55 PM
03-24-2012 07:59 PM
07-28-2012 09:22 AM