views:

57

answers:

1

I've built an app for the UK only which uses the device ID to uniquely identify the device. The app is only being added to specific handsets (not via the market) so the control of who has the app is quite high.

We're now getting the data back from the devices, and finding that some of the device IDs are hexadecimal and not purely digits (as IMEI should be).

Some of the data is returning absolutely correctly and some appears to be invalid hexadecimal.

Because some of the data is correct, is there any way that European devices can return MEID numbers or not, because that appears to be what is happening.

Code to return device id (with appropriate permissions included):

{
  tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
  return tm.getDeviceId();
}

Any ideas?

+1  A: 

Yes, the method returns an IMEI, MEID or ESN depending on the phone.

http://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId%28%29

Guffa