androidpermissionstabletimeideviceid

IMEI in Shield tablet is not available on Android Studio


I want to get IMEI(International Mobile Equipment Identity) in Shield tablet by getDeviceId() function. The program works very good for another smartphones and tablets but I have problem in Shield tablet(nVIDIA Shield 8-inch tablet).Permission in Manifest and for Android>=6 is in order and you can find this part of program in the following:

TelephonyManager tManager = (TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
        IMEI = tManager.getDeviceId();

The result is null.Please help me.


Solution

  • Quoting the documentation, getDeviceId():

    Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones. Return null if device ID is not available.

    (emphasis added)

    This is not unique to this one device. I would expect most devices lacking GSM or CDMA chips to return null for getDeviceId().

    You may wish to review the documentation regarding unique identifiers.