As we all know, each mobile phone has its own string, which is the only one in the world. Even if the same brand and model are the same, they will not be the same. This Code is the iemi code.
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.
With the IMEI code, we can easily distinguish each machine from its owner and user. The IMEI code cannot be changed by the user. Therefore, it prevents the "stealing and changing the column" user behavior to a large extent. For example, we can use the iemi code for login verification.
Some of my previous projects involved androidpad. (See http://www.linuxidc.com/Linux/2011-10/44917.htm and http://www.linuxidc.com/Linux/2011-10/44918.htm) I can also get IMEI code from it. It can be seen that the IMEI code is not limited to mobile phones, but the difference is that the IMEI code of the Aigo I tested contains letters.CodeWhen querying the IMEI code, there are letters in it. Do not hesitate. This is normal.
No more nonsense. Read the code!
The Code consists of Java code and manifest. xml.
First look at the Java code:
1. // obtain the IMEI code
Telephonymanager = (telephonymanager) This. getsystemservice (context. telephony_service );
String IMEI = telephonymanager. getdeviceid ();
5. // print the obtained IMEI code 6. system. out. println ("IMEI:" + IMEI); we set the IMEI string and print the string to see the IMEI code. The second is the permissions in manifest. xml:
1. <uses-Permission Android: Name = "android. Permission. read_phone_state"/>