How to get IMEI number for Google Nexus 7 TAB in android?

血红的双手。 提交于 2020-01-02 08:38:11

问题


I used the below code to get IMEI number for Google Nexus 7 tab. I couldn't got. How can i get IMEI number for Google Nexus 7?

TelephonyManager telephonyManager = (TelephonyManager) context
                .getSystemService(Context.TELEPHONY_SERVICE);
        return telephonyManager.getDeviceId();

回答1:


If I am not wrong google nexus 7 doesn't have any sim. SO if there is no sim you cannot get the IMEI number of the device as the IMEI is the network dependant on gsm networks. So if the device is wifi only you cannot identify the device by IMEI. You can use MAC address instead.




回答2:


Remember, you need to add the following permission to your manifest in order to call getDeviceId();

<uses-permission android:name="android.permission.READ_PHONE_STATE" />



回答3:


From what I can tell IMEI numbers are required for, but not limited to, devices with GSM. So technically each sim slot should have a IMEI number.

But even some devices with GSM do not have an IMEI number. These devices could be illegal, There are also rumors that special agencies of governments around the world use IMEI-less devices to avoid being traced by counter-intelligence.

IMEI numbers are verified with the Luhn formula just like credit card numbers. The number consists of 3 parts,


Type Allocation Code: Indicates the modal of the device. (8 digits)

Serial number: Uniquely identifying a unit of this device. (6 digits)

Check Digit: Used to verify the IMEI number. (1 digit)


On many devices the IMEI number can be retrieved by entering *#06#. The IMEI number of a GSM device can be retrieved by sending the command AT+CGSN through data cable.



来源:https://stackoverflow.com/questions/21228525/how-to-get-imei-number-for-google-nexus-7-tab-in-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!