I. Related Terms1) IMEI (International Mobile Equipment Identity) is the abbreviation of international mobile device identity code. It is an electronic serial number consisting of 15 digits ", it corresponds to each mobile phone, and the code is the only one in the world. Each mobile phone is assigned a unique group of numbers in the world after it is assembled. This number will be recorded by the manufacturer who manufactures it from production to delivery. 2) meid (mobile
Equipment Identifier) is the world's only 56bit mobile terminal ID. The ID number is burned into the terminal and cannot be modified. It can be used to identify and track mobile devices. Because ESN segments are limited resources and are basically exhausted, there may be a small amount of recycling segments. Therefore, a 56-bit meid segment is developed to replace the 32-bit ESN segment. MeId is mainly allocated to CDMA mobile phones. 3) ESN is the electronic serial number electronic
The abbreviation of serial number. It is a 32 bits length parameter and is the unique identifier of the mobile phone. 2. Declare permissions in code manifest
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
Get the device ID:
mDeviceIdStr = ((TelephonyManager) getSystemService(TELEPHONY_SERVICE)).getDeviceId();