Description:
Imsi is a unique number that identifies the only user in the GSM and UMTS networks. It is stored in the SIM card of the mobile phone and will be sent to the network through the mobile phone.
IMEI is also a unique number that identifies the only mobile phone in the GSM and UMTS networks. it is usually printed under the cell phone, dial * #06 # To See It.
Code: Here is the only way you read IMSI-ID/IMEI-ID in Android.
Java:
String myimsi = Android. OS. systemproperties. Get (Android. telephony. telephonyproperties. property_imsi );
// Within my emulator it returns: 310995000000000
String myimei = Android. OS. systemproperties. Get (Android. telephony. telephonyproperties. property_imei );
// Within my emulator it returns: 000000000000000
Not all mobile phone numbers can be obtained. Only some of them can be obtained. This is because the mobile operator did not write the data of the mobile phone number into the SIM card.
The SIM card only has a unique ID for the network and device to identify, that is, the imsi number. The mobile phone signal can also be said to be transmitted through this number in the network, not the mobile phone number.
Imagine if your SIM is lost, will a new one be replaced? -No
It is because the imsi number corresponding to your mobile phone number is changed to the imsi number of the new SIM card in the mobile operator.
Why can I display some mobile phone numbers?
This is like a variable. When a mobile operator assigns a value to it, it naturally has a value. Null if no value is assigned.
/**
* Get some cell phone Logos
*
* @ Param C
* @ Return string indicates the mobile phone type.
*/
Public String fetch_status (context c ){
Telephonymanager TM = (telephonymanager) c
. Getsystemservice (context. telephony_service );//
String STR = "";
String imsi = TM. getsubscriberid ();
STR + = "DeviceID (IMEI) =" + TM. getdeviceid () + "/N ";
STR + = "devicesoftwareversion =" + TM. getdevicesoftwareversion ()
+ "/N ";
STR + = "line1number =" + TM. getline1number () + "/N ";
Return STR;
}