Imei android number for tablet

In my application, I need to get a unique device number for which I use TelephonyManager . I can get imei or device id on Android phones, but is it possible to use a unique number for an Android tablet (Xoom)? I use this code to get the imei number, but I can’t get on the tablet, enter code here

 TelephonyManager telephonyManager1 = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); imei = telephonyManager1.getDeviceId(); 
+2
android
source share
1 answer

I think IMEI is only for 3G tablets. Try using

ANDROID_ID

In particular, Settings.Secure.ANDROID_ID. This is a 64-bit amount that is generated and saved the first time the device boots. When erasing the device, reset.

ANDROID_ID seems like a good choice for a unique device identifier. There are drawbacks: firstly, it is not 100% reliable in Android releases prior to 2.2 ("Froyo"). In addition, at least one well-known mistake in a popular phone from a major manufacturer, where each instance has the same ANDROID_ID.

Look here

+3
source share

All Articles